Problem with proxy_pass,
yevhen
nginx-forum at nginx.us
Tue Oct 15 15:03:40 UTC 2013
Hi,
I am using latest nginx (1.4.3) on centos with next location configuration:
location ~^/3g {
auth_basic "Restricted";
auth_basic_user_file htpasswd;
rewrite ^/3g/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:18001;
# proxy_redirect off;
proxy_redirect 127.0.0.1:18001/ /3g/;
proxy_set_header SCRIPT_NAME /3g;
proxy_set_header X-Script-Name /3g;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}
127.0.0.1 - is reverse ssh tunnel to some hardware, with apache on it.
if I use location / - all works perfect, but with location /3g opening
http://SERVER_IP/3g - I see next in firebug:
http://SERVER_IP/cgi-bin/dlDevices.plx?Command=DeviceList&Date=Tue
So somehow cgi-bin is not redirected to /3g location.
Please help.
Thank you
Yevhen
Posted at Nginx Forum: http://forum.nginx.org/read.php?21,243720,243720#msg-243720
Подробная информация о списке рассылки nginx-ru