I need to redirect a website already up and running on a digital ocean server from http://www.example.com to https://www.example.com. I’ve been working on it all day and have been able to generate an ssl certificate from lets encrypt and have stored it in a specific file in my directory. I know I need to give the server the location of the certificate but I dont know where I have to type that in. I tried following a tutorial https://www.digicert.com/ssl-certificate-installation-ubuntu-server-with-apache2.htm but that doesnt seem to work either. On running a config test, I get an error saying that snakeoil.key (private key) file does not exist. Although when I sudo nano that file, I can see the key (it does exist!) I dont know what to do here anymore. Any help will be greatly appreciated. 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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!