I have broken my site while installing SSL (LAMP)

May 14, 2018 66 views
Apache

I have an SSL for my site Oraious.com

Im not sure how it happened but I placed my SSL certificates with CA and the key in the /root/.Oraious (later moved to the directory listed below in my code)

I then edited my 000-default.conf

to:

<VirtualHost *:80>
        ServerName oraious.com
        ServerAlias www.oraious.com

      DocumentRoot /var/www/html
      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/html>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
                Require all granted
    </Directory>

</VirtualHost>

<VirtualHost *:443>
        ServerName oraious.com
        ServerAlias www.oraious.com


    <Directory /var/www/html>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
                Require all granted
    </Directory>


        ServerAdmin webmaster@domain.com
        DocumentRoot /var/www/html
        SSLEngine on
        SSLCertificateFile /ect/SSL/oraious.com.crt
        SSLCertificateKeyFile /ect/SSL/oraious.com.key
        SSLCACertificateFile  /ect/SSL/intermediate.crt


        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined


</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Then when I went to my site I got "safari can't open the page "https//:Oraious.com" because safari can't establish a secure connection to the server "Oraious.com"

so I revered my code back to

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        <Directory /var/www/html/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        <IfModule mod_dir.c>
            DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
        </IfModule>

</VirtualHost>

Now I can goto my site I get the same error unless I go to "oraious.com/gb" but then if I press the "MyStore" it dies again.

Considering I only edited that file im not sure where else has been effected and whats causing the redirection.

1 Answer

I would recommend running apachectl configtest to run a test on your configuration. This should identify any lines that are causing issues currently. Unfortunately Safari's error message that you relayed doesn't provide much actionable information on why the browser could not establish a secure connection.

Have another answer? Share your knowledge.