[solved] Re: proxy problem

lucas at landm.net lucas at landm.net
Mon Jun 7 18:55:04 MSD 2010


 Hi Igor,

>> We solved with this code:
>>
>>         location / {
>>                 rewrite ^(.*) https://server$1 permanent;
>>         }
>
> I do not see how this rewrite may resolve the issue.

 The problem was an internal redirection from squirrelmail. Doing some
operation, it redirects to http://server/ [no SSL ] and the previous
code:

         location / {
                 rewrite ^(.*) https://server/ last;
         }

lost the session.

 Regards,
   Lucas


> BTW,
>
>          proxy_redirect     on; // for nginx 0.6.33
>
> is wrong for 0.6.x as well as 0.7.x.
>
>>  Regards,
>>    Lucas
>>
>> >  Hi,
>> >
>> >    We had nginx/0.6.33 and we migrated to nginx/0.7.65.
>> > We use nginx as frontend for our webmail, that it is in another
>> machine
>> > (nginx+apache).
>> > But in the new scenario, squirrelmail loss session (I guess) and force
>> me
>> > to relogin again.
>> > Compile options and config files are the same (except for
>> proxy_redirect)
>> >
>> > This is:
>> >         location / {
>> >                 proxy_pass http://mailmachine:80;
>> >                 proxy_redirect     default;  // for nginx 0.7.65
>> >                 proxy_redirect     on; // for nginx 0.6.33
>> >
>> >                 proxy_set_header   Host             $host;
>> >                 proxy_set_header   X-Real-IP        $remote_addr;
>> >                 proxy_set_header   X-Forwarded-For
>> > $proxy_add_x_forwarded_for;
>> >                 proxy_set_header   X-Forwarded-Proto https;
>> >                 client_max_body_size       10m;
>> >                 client_body_buffer_size    128k;
>> >                 proxy_connect_timeout      90;
>> >                 proxy_send_timeout         90;
>> >                 proxy_read_timeout         90;
>> >                 proxy_buffering            on;
>> >                 proxy_buffers              8 8k;
>> >                 proxy_buffer_size          8k;
>> >                 proxy_busy_buffers_size    16k;
>> >                 proxy_temp_file_write_size 1024m;
>> >         }
>> >
>> >  What changes are in version 0.7 that I should consider?
>> >
>> >  Thank you in advance,
>> >     Lucas
>> >
>> >
>> >
>> > _______________________________________________
>> > nginx mailing list
>> > nginx at nginx.org
>> > http://nginx.org/mailman/listinfo/nginx
>> >
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx at nginx.org
>> http://nginx.org/mailman/listinfo/nginx
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>




More information about the nginx mailing list