Question

Need instruction to access both http and https

We want to know how to use both http and https for our website, and how to setup both http and https for only single url of our website.

Thanks in advance


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

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.

This article should point you in the right direction to get started with SSL and nginx: <br> <br>https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-nginx-for-ubuntu-14-04

Our server is nginx

Hi Jake, <br> <br>Without know more details of your setup, it’s hard to give exact advice. Generally, you’d just set up a new VirtualHost listening on port 443: <br> <br><pre> <br><VirtualHost *:443> <br> ServerName example.com <br> DocumentRoot /var/www/http <br> SSLEngine On <br> SSLCertificateFile /etc/apache2/ssl/apache.crt <br> SSLCertificateKeyFile /etc/apache2/ssl/apache.key <br> # etc… <br></VirtualHost> <br> <br><VirtualHost *:80> <br> ServerName example.com <br> DocumentRoot /var/www/http <br> # etc… <br></VirtualHost> <br></pre> <br> <br>If you could expand on your setup and use case, maybe we could come up with a more detailed answer.