Last active
November 30, 2016 16:38
-
-
Save eftakhairul/d2aae6b24f434a4f650a to your computer and use it in GitHub Desktop.
Configuration for nginx with rails by puma
This file contains hidden or 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 { | |
# Path to Puma SOCK file, as defined previously | |
server unix:/home/app/abc-app/shared/sockets/puma.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
root /home/app/abc-app/public; | |
try_files $uri/index.html $uri @app; | |
location @app { | |
proxy_pass http://app; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
} | |
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