samedi 6 octobre 2018

Installed SSL on Apache server, page not responding

My question is about SSL installation. I purchased a new SSL for a website that's hosted on a Ubuntu 16.04 box with Apache 2.4.29. I was able to get this installed and I'm not getting any errors but my page is not redirecting. I've followed some guides (DigitalOcean) but feel as I'm missing something.

I have checked the sites-available files (000-default.conf, default-ssl.conf & example.com.conf) and I'm not seeing anything that's catching my eye, but I feel I migtht be missing something. I've checked the status of Apache and I'm not getting any errors and I've restarted the services several times to no avail.

Here's a general breakdown of what I have. Am I missing something? Is additional information required for setting this up?

000-default.conf

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www
    Redirect "/" "https://example.com/"
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

default-ssl.conf

<IfModule mod_ssl.c>
    <VirtualHost _default_:443>
            ServerAdmin webmaster@localhost
            DocumentRoot /var/www
            SSLCertificateFile /root/example.com.crt
            SSLCertificateKeyFile /root/www.example.com.key
            SSLCACertificateFile /root/intermediate.crt

            <FilesMatch "\.(cgi|shtml|phtml|php)$">
                            SSLOptions +StdEnvVars
            </FilesMatch>

            <Directory /usr/lib/cgi-bin>
                            SSLOptions +StdEnvVars
            </Directory>

            </VirtualHost>
 </IfModule>4

mydomain.com.conf

<VirtualHost *:443>
    ServerAdmin admin@somedomain.com
    ServerName mydomain.com
    ServerAlias www.example.com
    DocumentRoot /var/www/example.com/html
    Redirect permanent / https://example.com
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>




Aucun commentaire:

Enregistrer un commentaire