4 messages in ru.sysoev.nginxRe: Help with nginx.conf file for pro...
FromSent OnAttachments
Igor SysoevNov 2, 2006 4:38 am 
T GillettNov 2, 2006 11:12 pm 
Igor SysoevNov 3, 2006 12:21 am 
T GillettNov 3, 2006 4:42 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Help with nginx.conf file for proxyingActions...
From:T Gillett (tgil@public.gmane.org)
Date:Nov 2, 2006 11:12:40 pm
List:ru.sysoev.nginx

Igor Sysoev <is@...> writes:

#proxy NSLU2 web admin, located on 192.168.1.77:80 location /nslu2/ { proxy_pass http://192.168.1.77:80/;

You should change the line above to

proxy_pass http://192.168.1.77:80/nslu2/; or to proxy_pass http://192.168.1.77:80;

proxy_redirect default; } }

server { listen 7008; server_name nslu2;

#proxy NSLU2 web admin location / { proxy_pass http://192.168.1.77:80/; proxy_redirect default; } }

Igor Thanks for the response. A couple of points:

- The address in the proxy_ pass line has to have the trailing / or it doesn’t bring up the page at all. - The home page of the NSLU2 device is at http://192.168.1.77:80. If I add the /nslu2/ as you suggest I get a “Page not found” screen back from the NSLU2

To illustrate the problem, the two sequences below show the series of URLs that are used when accessing the NSLU2 device directly, and then through the proxy server. Both work the same until I get to the third step when it fails through the proxy server. This is obviously because there is no valid page at http://192.168.1.77:7007/mydir. The required page is at http://192.168.1.77:7007/nslu2/mydir

If I manually edit the URL in the browser to include /nslu2 in front of the /mydir in the URL it goes to the right page. The same will happen for all further links.

Accessing the NSLU2 directly: Start at Home page: http://192.168.1.77/ Login link on Home page: http://192.168.1.77/login.cgi Browse Files page, select mydir: http://192.168.1.77/mydir/

Accessing the NSLU2 through nginx with my conf file: Start at Home page: http://192.168.1.77:7007/nslu2/ Login link on Home page: http://192.168.1.77:7007/nslu2/login.cgi Browse Files page, select mydir: http://192.168.1.77:7007/mydir

It seems to me that I am missing something in the conf file to make the proxy server include 7007:/nslu2 in the URL instead of just :7007

Thanks for any suggestions.

Regards Terry