Report this

What is the reason for this report?

Ngnix SSL server block not to force https

Posted on December 18, 2016

Hello digitalocean users,

Is it possible to NOT force HTTPS. I have a Multi Wordpress site setup and I’m attempting to perform domain mapping that will allow me to have HTTPS and none SSL sites running from the same IP. My current SSL setup works but everytime I add a domain I’m required to create a SSL certificate to my project… what if I want to have a regular HTTP site instead?

So while my domain mapping plugin from WPMUDev has https forcing OFF. My server block does the opposite.

My port 80 server block looks like this

server { listen 80; server_name example.com www.example.com; return 301 https://$server_name$request_uri; }

If I remove the 301 redirect from the server block then all none SSL just redirect to example.com instead of the appropriate domain.

Any help would be appreciated.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.