Created
September 8, 2013 16:35
-
-
Save tunglam14/6486256 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_name { | |
server unix:/usr/local/app_name/tmp/sockets/unicorn.sock; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
root /usr/local/app_name/public; | |
server_tokens off; | |
access_log /var/log/nginx/app_name_access.log; | |
error_log /var/log/nginx/app_name_error.log; | |
location / { | |
try_files $uri $uri/index.html $uri.html @app_name; | |
} | |
location @app_name { | |
proxy_read_timeout 300; | |
proxy_connect_timeout 300; | |
proxy_redirect off; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_pass http://app_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment