I have the following setup to process certain domains with rails via unicorn:
http {
# ...
upstream unicorn_server {
# This is the socket we configured in app's config unicorn.rb
server unix:/var/www/foo.bar.com/tmp/sockets/unicorn.sock fail_timeout=0;
}
# ...
}
server {
listen foo.bar.com:80;
server_name foo.bar.com;
# ...
location / {
if (!-f $request_filename) {
proxy_pass http://unicorn_server;
break;
}
}
}
While Chrome does handle it properly (shows the rails app), Firefox and possibly other browsers are redirected to http://unicorn_server (the unicorn upstream is not invoked). Can you please tell me what am I missing here?
nginx: nginx version: nginx/1.0.10,
unicorn v4.2.0