Last active
September 24, 2018 19:30
-
-
Save jacksonpires/b4e0f8c37f28a41e519361931522d5a6 to your computer and use it in GitHub Desktop.
Arquivo de Configuração NGINX/Site (/etc/nginx/sites-enabled/escamboapp)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream escamboapp { | |
server unix:/tmp/escamboapp.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name escamboapp.com.br; | |
root /var/www/escamboapp/current/public; | |
index index.html index.htm; | |
client_max_body_size 10M; | |
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_set_header X-FORWARDED_PROTO $scheme; | |
proxy_redirect off; | |
if ($request_uri ~* "\.(ico|css|js|gif|jpe?g|png)\?[0-9]+$") { | |
access_log off; | |
add_header Cache-Control public; | |
expires max; | |
break; | |
} | |
if (!-f $request_filename) { | |
proxy_pass http://escamboapp; | |
break; | |
} | |
} | |
error_page 500 502 503 504 /500.html; | |
location = /500.html { | |
root /var/www/escamboapp/current/public; | |
} | |
error_page 404 /404.html; | |
location = /404.html { | |
root /var/www/escamboapp/current/public; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment