Re: nginx https redirect

chipitsine gmail.com
20 03:47:20 UTC 2011


  

   upstream  site.ru  {
        #ip_hash;
        server   server1;
        server   server2;
    }


.....

proxy_pass http://site.ru;

   Host   .


     IIS (,   
  web.config   ),    IIS URL
Rewrite,   .

17  2011. 19:42  Magikanin <nginx-forum  nginx.us> :
>    
>  :
>   c IIS.   frontend 
>  nginx (0.8.54).
>
>  fronend   :
>     https://site.ru/profile.aspx
>     
>  https://site.ru/login.apx  
>     
> https://site.ru/profile.aspx
>
>   frontend  
>  :
>    https://site.ru/login.apx .
>    Object moved here.  .
>
>   nginx:
>  server {
>    listen    80;
>    server_name site.ru;
>
>
>    location / {
>      proxy_pass     http://backend;
>      proxy_redirect   http://www.site.ru/ /;
>      proxy_set_header  Host       $host;
>      proxy_set_header  X-Real-IP    $remote_addr;
>      proxy_set_header  X-Forwarded-For
> $proxy_add_x_forwarded_for;
>
>    }
>  }
>  server {
>    ssl on;
>    ssl_protocols SSLv3 TLSv1;
>    ssl_ciphers
> AES128-SHA:AES256-SHA:RC4-SHA:DES-CBC3-SHA:RC4-MD5;
>    listen 443;
>    ssl_certificate   /etc/nginx/www.site.pem;
>    ssl_certificate_key /etc/nginx/www.site.key;
>    ssl_session_cache  shared:SSL:10m;
>    ssl_session_timeout 10m;
>    server_name site.ru;
>    location / {
>    proxy_pass     http://backend;
>    proxy_redirect     http://www.site.ru/ /;
>    proxy_set_header  Host       $host;
>    proxy_set_header  X-Real-IP    $remote_addr;
>    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
>  }
>
>     ?
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?21,212486,212486#msg-212486
>
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru  nginx.org
> http://nginx.org/mailman/listinfo/nginx-ru
>


nginx-ru