forked from jmonberg/planning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
31 lines (25 loc) · 796 Bytes
/
nginx.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
upstream puma {
server unix:///home/jmonberg/apps/planning/shared/tmp/sockets/planning-puma.sock;
}
server {
listen 80 default_server deferred;
# server_name example.com;
root /home/jmonberg/apps/planning/current/public;
access_log /home/jmonberg/apps/planning/current/log/nginx.access.log;
error_log /home/jmonberg/apps/planning/current/log/nginx.error.log info;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @puma;
location @puma {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://puma;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 10M;
keepalive_timeout 10;
}