Skip to content

Instantly share code, notes, and snippets.

@aalvesjr
Created November 12, 2015 16:37
Show Gist options
  • Save aalvesjr/2b300a6cb23049d9e6e9 to your computer and use it in GitHub Desktop.
Save aalvesjr/2b300a6cb23049d9e6e9 to your computer and use it in GitHub Desktop.
Comentar as linhas para explicar a configuração
upstream web {
server localhost:3000;
}
server {
listen 80;
server_name 104.236.254.113;
root /home/taskv/app/current/public;
index index.html index.htm;
client_max_body_size 10M;
location ~ (\.(php|aspx|asp)|myadmin) {
return 444;
}
location ~ ^/assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
access_log off;
}
location / {
try_files $uri @app;
}
location @app {
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_set_header X-FORWARDED_PROTO $scheme;
proxy_redirect off;
proxy_pass http://web;
break;
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /home/taskv/app/current/public;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment