host -> jail -> host - BAD GATEWAY
Cliff Wells
cliff at develix.com
Sat Nov 6 00:40:05 MSK 2010
On Fri, 2010-11-05 at 16:11 -0400, dong wrote:
> Im using FreeBSD and jails. I have my postfix on host, and main http
> server in jail.
>
> When I set in jail (192.168.1.2):
>
> server {
> <------>listen 80;
> <------>server_name www.poczta.a.org poczta.a.org;
> <------>access_log /var/log/nginx/poczta.a.org-access.log;
>
> <------>location / {
> <------><------> proxy_pass http://188.212.129.X;
> <------><------> proxy_set_header X-Real-IP $remote_addr;
> <------><------> proxy_set_header Host $http_host;
> <------>}
> }
>
> 188.212.129.X it is my host IP.
I'm not too familiar with BSD or BSD jails, but it sounds like a network
configuration issue rather than an Nginx issue. I'd first make sure
that 188.212.129.X is actually reachable from inside the jail. Then
make sure that whatever you are proxying to on the public IP is actually
listening there on port 80. Then make sure you aren't filtering
packets to that 188.212.129.X:80 or that you at least have an exception
for 192.168.1.2.
Overall, I'm pretty confused as to what you are trying to accomplish by
proxying from a jail with a private IP address to a service that
apparently resides on a public IP address, since you could simply bypass
the proxy and access the public IP directly.
Cliff
--
Cliff Wells <cliff at develix.com>
More information about the nginx
mailing list