Created
January 18, 2012 20:23
-
-
Save joequery/1635318 to your computer and use it in GitHub Desktop.
Nginx config for use with multiple rails apps
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
worker_processes 1; | |
user nobody nogroup; | |
pid /tmp/nginx.pid; | |
error_log /tmp/nginx.error.log; | |
events { | |
worker_connections 1024; | |
accept_mutex off; | |
} | |
http { | |
default_type application/octet-stream; | |
access_log /tmp/nginx.access.log combined; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay off; | |
gzip on; | |
gzip_http_version 1.0; | |
gzip_proxied any; | |
gzip_min_length 500; | |
gzip_disable "MSIE [1-6]\."; | |
gzip_types text/plain text/html text/xml text/css | |
text/comma-separated-values | |
text/javascript application/x-javascript | |
application/atom+xml; | |
include /etc/nginx/sites-enabled/*; | |
########################################################## | |
# Catch all requests to server ip so just hitting the ip | |
# won't render anything. | |
########################################################## | |
server { | |
listen 80 default; | |
server_name everythingelse; | |
# Everything is a 404 | |
location / { | |
return 404; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment