-
-
Save osnysantos/f192575d9dc47648e0563df742a90649 to your computer and use it in GitHub Desktop.
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 app { | |
server unix:/home/deploy/myapp/shared/tmp/sockets/puma.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
root /home/deploy/myapp/current/public; | |
try_files $uri/index.html $uri @app; | |
location ~ /.well-known { | |
allow all; | |
} | |
location / { | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
proxy_redirect off; | |
proxy_http_version 1.1; | |
proxy_set_header Connection ''; | |
proxy_pass http://app; | |
} | |
location ~ ^/(assets|fonts|system)/|favicon.ico|robots.txt { | |
gzip_static on; | |
expires max; | |
add_header Cache-Control public; | |
} | |
error_page 500 502 503 504 /500.html; | |
client_max_body_size 4G; | |
keepalive_timeout 10; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment