ZipperZapper
Verified User
- Joined
- Nov 30, 2015
- Messages
- 142
I've been staring at this all weekend and I don't know if I'm overlooking something. I'm using Nginx-only and made some adjustments to my config files, so far, so good.
But if you enable SSL on a website, and you would like to make it default and set a rewrite, how would you do that? The easiest way would be changing nginx_server.conf in this:
But then it will never me able to use a plain-text website, so that's not a good way. It's also possible to make some changes with Custom HTTPD Configurations, but a rewrite to https will then also be included in the server block where ssl is enabled. I don't think that's the right way either, is it?
What would be a good way to force a particular website to redirect to https?
But if you enable SSL on a website, and you would like to make it default and set a rewrite, how would you do that? The easiest way would be changing nginx_server.conf in this:
Code:
server
{
listen |IP|:|PORT_80|;
|MULTI_IP|
server_name |DOMAIN| www.|DOMAIN|;
return 301 https://|DOMAIN|$request_uri;
}
But then it will never me able to use a plain-text website, so that's not a good way. It's also possible to make some changes with Custom HTTPD Configurations, but a rewrite to https will then also be included in the server block where ssl is enabled. I don't think that's the right way either, is it?
What would be a good way to force a particular website to redirect to https?