redirect from http to https

Steve Zhuo lists at ruby-forum.com
Sun Mar 8 23:28:46 MSK 2009


Hi

I'm trying to redirect all income request from http to https:  i've
tried the rewrite module , but i always got the redirect in a loop
issue. please help.


server {
        listen       80;
        server_name  www.domain.com domain.com;
       rewrite     ^(.*)  https://$server_name$1 permanent;

       '''''''
       }

 server {
        listen       443;
        server_name  www.domain.com domain.com;
        .....
        }



Thank You.
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list