Require SSL for specific URLS

jorgelo nginx-forum at nginx.us
Fri Nov 20 23:50:12 MSK 2009


Here is what I have so-far, but I'm not sure how to go back.


location ~ ^/(secure) {
          if ($scheme = 'http') {
            #Insecure, lets go to https
            rewrite   ^/(.*)$  https://$host/$1  permanent;
          }
}


Posted at Nginx Forum: http://forum.nginx.org/read.php?2,24495,24496#msg-24496






More information about the nginx mailing list