Report this

What is the reason for this report?

I have broken my site while installing SSL (LAMP)

Posted on May 14, 2018

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.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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.

Consider using CertBot, it’s free and very easy to install.

(https://certbot.eff.org/)

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.