public
Description: Ruby, Rails, Linux environment configuration automation.
Homepage:
Clone URL: git://github.com/mmond/configuration-automation.git
configuration-automation / eldorado.nginx.conf
100644 33 lines (31 sloc) 0.715 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
upstream mongrel {
   server 127.0.0.1:8000;
   server 127.0.0.1:8001;
}
 
server {
listen 80;
server_name localhost;
server_name * _;
root /var/www/el-dorado/current/public;
index index.html index.htm;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect false;
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
}
if (!-f $request_filename) {
proxy_pass http://mongrel;
break;
}
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}