Report this

What is the reason for this report?

Need instruction to access both http and https

Posted on May 21, 2014

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



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.

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.

Our server is nginx

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

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.