By SeeYouSpace
I can’t get my website to load on secure networks. I have had an SSL Certificate created, not sure if that helps.
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!
To use an SSL Certificate to access https://yourdomain.ext, you’ll need to generate a CSR (Certificate Signing Request), supply that to your SSL Provider and then add the SSL Certificate that they issue to your VirtualHost configuration.
To do this, once you have the required file(s), you’d want to edit the VirtualHost associated with your domain and find either:
<VirtualHost DROPLET_PUBLIC_IP:80>
or
<VirtualHost *:80>
and change it to:
<VirtualHost DROPLET_PUBLIC_IP:443>
… where DROPLET_PUBLIC_IP would be the Public IP Address assigned to your Droplet.
–
In the same file, find:
ServerName yourdomain.ext:80
or
ServerName yourdomain.ext
and change it to:
ServerName yourdomain.ext:443
… now, still in the same file, you’ll want to add the following towards the bottom of your VirtualHost configuration:
SSLEngine on
SSLCertificateFile /path/to/ssl-cert.pem
SSLCertificateKeyFile /path/to/ssl-cert.key
… where /path/to/ = the full path to the pem and key file for your SSL Certificate.
Now save, close the file and issue the following command from the CLI:
a2enmod ssl
The above command will enable the SSL Module if it hasn’t already been.
Finally, you need to restart Apache by issuing:
service apache restart
or
/etc/init.d/apache2 restart
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.