Hi all,
I followed this guide to install a Comodo SSL to my VPS : https://www.digitalocean.com/community/tutorials/how-to-install-an-ssl-certificate-from-a-commercial-certificate-authority (Apache version)
First, I used Filezilla to upload the files I received from Comodo to /etc/ssl
Than I followed the instructions to modify 000-default.conf
This is the result:
<VirtualHost *443>
ServerName www.mydomain.com
Redirect permanent / https://www.mydomain.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/mydomain.crt
SSLCertificateKeyFile /etc/ssl/mydomain.key
SSLCACertificateFile /etc/ssl/mydomain.ca-bundle
<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
</VirtualHost>
Would the problem be caused by the .ca-bundle?
Thanks!
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.
@julienr
As per the guide you’ve linked to, you should have two VirtualHost blocks – one serving requests on Port 80 and then one similar to the above that handles requests on Port 443 (i.e. SSL).
Your first VirtualHost block should look like the one shown below (of course, using your domain).
Directly below the above, we set the VirtualHost block that handles the actual SSL connections.
The difference between the above SSL definition and the one you provided in your original post is that the first line where you open the VirtualHost block, you need a colon between the asterisk and the port. The second issue which has been removed from the original is the line that redirects. You want to redirect from port 80 to port 443, not redirect port 443 to 443 :-).
You’ll want to replace
mydomain.com
with your actual domain, make sure the paths above are real paths, and then restart apache. That should help to get you up and running.If you run in to any errors, you’ll want to take a look at the error log and see what’s showing as the error log often provides more details than what you’ll see in-browser.
Thanks, it worked!