Problem with proxy_pass,

yevhen nginx-forum at
Tue Oct 15 15:03:40 UTC 2013


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_redirect off;
	proxy_redirect /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;

} - 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:


So somehow cgi-bin is not redirected to /3g location.

Please help.

Thank you

Posted at Nginx Forum:,243720,243720#msg-243720

Подробная информация о списке рассылки nginx-ru