-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnginx-sites.conf
36 lines (29 loc) · 956 Bytes
/
nginx-sites.conf
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
34
35
36
# this can be any application server, not just Unicorn/Rainbows!
upstream app_server {
# for UNIX domain socket setups:
#server unix:/var/run/unicorn.sock fail_timeout=0;
# for TCP setups, point these to your backend servers
server localhost:3000 fail_timeout=0;
# server 192.168.0.8:8080 fail_timeout=0;
# server 192.168.0.9:8080 fail_timeout=0;
}
server {
listen 80 default deferred; # for Linux
client_max_body_size 4G;
server_name _;
keepalive_timeout 5;
# path for static files
root /var/www/helpy/public;
try_files $uri/index.html $uri.html $uri @app;
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://app_server;
}
# Rails error pages
error_page 500 502 503 504 /500.html;
location = /500.html {
root /var/www/helpy/public;
}
}