Forcing SSL;

David J. david at styleflare.com
Tue Feb 8 19:14:29 MSK 2011


Wouldn't that create an infinite loop?

shouldnt that be wrapped in an if statement?

if($scheme == http){

rewrite ^ https://example.com$request_uri? break;

}

On 2/8/11 11:07 AM, Luit van Drongelen wrote:
> On Tue, Feb 8, 2011 at 5:05 PM, David J.<david at styleflare.com>  wrote:
>> What is the best way to force all connections to use SSL?
> I use a separate server block like this:
>
>
> server {
>      server_name  example.com;
>      rewrite ^ https://example.com$request_uri? break;
> }
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>




More information about the nginx mailing list