Welcome! Log In Create A New Profile

Advanced

Reverse Proxy SubDirectory HELP

Posted by spyderwebtech 
Reverse Proxy SubDirectory HELP
December 10, 2009 10:42PM
Hello everyone,

I am using Ngnix as a reverse proxy to load balance my apache application servers. I have followed the sample configuration files:

[quote]http {
upstream mycluster {
server 127.0.0.1:8000;
server 127.0.0.1:8001;
server 127.0.0.1:8002;
server 127.0.0.1:8003;
}

server {
listen 80;
server_name www.domain.com;
location / {
proxy_pass http://mycluster;
}
}
}[/quote]

It works fantastic until I try to navigate to a subdirectory such as:

http://www.domain.com/sub-directory

in which Nginx directs to

http://mycluster/sub-directory

I have a sneaky suspicion that I need to do rewrites for all my sub directories but thought I would ask the community before I did such a thing...

Am I missing something?



Edited 1 time(s). Last edit at 12/10/2009 10:43PM by spyderwebtech.
Re: Reverse Proxy SubDirectory HELP
March 25, 2010 12:36PM
what is exactly failing? are your backend servers expecting a certain HOST header value?

if so, maybe consider passing the correct host header to your backend servers.

proxy_set_header Host www.domain.com;
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 133
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready