Created
October 13, 2009 19:03
-
-
Save damm/209456 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 unicorn { | |
server unix:/u/apps/something/shared/sockets/unicorn.sock; | |
} | |
server { | |
listen 80; | |
server_name something.com; | |
access_log /u/apps/something/current/log/access.log main; | |
error_log /u/apps/something/current/log/error.log error; | |
client_max_body_size 50m; | |
root /u/apps/something/current/public; | |
location @unicorn { | |
proxy_pass http://unicorn; | |
proxy_set_header X-Forwaded-For $proxy_add_x_forwaded_for; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
location @something { | |
root /u/apps/something/current/public; | |
} | |
location / { | |
try_files $uri $uri/ @unicorn; | |
} | |
if (-f $document_root/system/maintenance.html) { | |
rewrite ^(.*)$ /system/maintenance.html last; | |
break; | |
} | |
error_page 500 502 503 504 /500.html; | |
error_page 404 /404.html; | |
location = /500.html { | |
try_files @something | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment