Created
January 10, 2012 13:35
-
-
Save tibra/1589113 to your computer and use it in GitHub Desktop.
Nginx config with Unicorn and Rails 3.1
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 example { | |
server unix:/home/example/shared/example.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name example.com; | |
client_max_body_size 100M; | |
root /home/example/current/public; | |
access_log /home/example/shared/log/access.log main; | |
error_log /home/example/shared/log/error.log info; | |
# This is a ruby application, deny other common types. | |
location ~ \.(php|asp|aspx|jsp|cfm|dll)$ { | |
deny all; | |
break; | |
} | |
location / { | |
include /etc/nginx/conf/proxy.conf; | |
if (!-f $request_filename) { | |
proxy_pass http://example; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment