Welcome! Log In Create A New Profile

Advanced

Problem with proxy_pass,

October 15, 2013 11:03AM
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
Subject Author Posted

Problem with proxy_pass,

yevhen October 15, 2013 11:03AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready