Hi,
I have a nginx set up to reverse proxy to a mongrel_cluster. The
relevant part of the nginx config is below:
upstream mongrel {
server 127.0.0.1:8000;
server 127.0.0.1:8001;
server 127.0.0.1:8002;
}
server {
(…)
if (!-f $request_filename) {
proxy_pass http://mongrel;
break;
}
}
And the config of the mongrel cluster:
user: mongrel
cwd: /opt/sites/xxx
log_file: log/mongrel.log
port: “8000”
environment: production
group: mongrel
address: 127.0.0.0
pid_file: tmp/pids/mongrel.pid
servers: 3
I start the mongrel_cluster with “sudo -u mongrel mongrel_rails
cluster::start”
The above setup works. However, what I would like to achieve is the to
have the mongrel_cluster only available through the rev. proxy (so
http://example.com:8000 will not work, only http://example.com). For
that I’d have to uncomment the above address: 127.0.0.0 line.
When I do that, I get an 502 accessing http://example.com and I am not
sure why. Also, all the nginx error logs are empty so I can not peek
into the problem. (I got the 502 from the access log). The entire config
files are here: http://gist.github.com/88662
Any help is appreciated,
Balint