31 lines
754 B
Nginx Configuration File
31 lines
754 B
Nginx Configuration File
upstream puma {
|
|
server unix:///var/www/app/shared/tmp/sockets/puma.sock;
|
|
}
|
|
|
|
server {
|
|
client_max_body_size 4G;
|
|
error_page 500 502 503 504 /500.html;
|
|
keepalive_timeout 10;
|
|
listen 80;
|
|
root /var/www/app/current/public;
|
|
server_name 172.16.23.112;
|
|
try_files $uri/index.html $uri @app;
|
|
|
|
location / {
|
|
access_log /var/www/app/current/log/nginx.access.log;
|
|
error_log /var/www/app/current/log/nginx.error.log;
|
|
proxy_http_version 1.1;
|
|
proxy_pass http://puma;
|
|
proxy_redirect off;
|
|
proxy_set_header Connection '';
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
location ^~ /assets/ {
|
|
add_header Cache-Control public;
|
|
expires max;
|
|
gzip_static on;
|
|
}
|
|
}
|