Created
April 30, 2010 15:18
-
-
Save rufo/385334 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
#from expojunkie | |
#user nobody; | |
worker_processes 4; | |
worker_rlimit_nofile 8192; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
events { | |
worker_connections 4024; | |
} | |
http { | |
passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11; | |
passenger_ruby /usr/local/bin/ruby; | |
include mime.types; | |
default_type application/octet-stream; | |
#log_format main '$remote_addr - $remote_user [$time_local] $request ' | |
# '"$status" $body_bytes_sent "$http_referer" ' | |
# '"$http_user_agent" "$http_x_forwarded_for"'; | |
#access_log logs/access.log main; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay off; | |
#keepalive_timeout 0; | |
keepalive_timeout 65; | |
gzip on; | |
gzip_http_version 1.1; | |
gzip_vary on; | |
gzip_comp_level 2; | |
gzip_proxied any; | |
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
# make sure gzip does not lose large gzipped js or css files | |
# see http://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl | |
gzip_buffers 16 8k; | |
# Disable gzip for certain browsers. | |
gzip_disable “MSIE [1-6].(?!.*SV1)”; | |
server { | |
listen 80; | |
server_name pax.expojunkie.com; | |
root /home/web/public_html/expojunkie/current/public; # <--- be sure to point to 'public'! | |
passenger_enabled on; | |
if ($http_user_agent ~* '(Mobile|webOS)') { | |
rewrite ^\/$ /index.mobile; | |
} | |
location ~ ^/(images|iui|javascripts|stylesheets|system)/ { | |
expires max; | |
break; | |
} | |
if (-f $document_root/cache$uri.html) { | |
rewrite (.*) /cache$1.html; | |
} | |
if (-f $document_root/cache$uri/index.html) { | |
rewrite (.*) /cache$1/index.html; | |
} | |
if (-f $document_root/cache$uri) { | |
rewrite (.*) /cache$1; | |
break; | |
} | |
} | |
server { | |
listen 80 default; | |
server_name _; | |
root /home/web/public_html/expojunkie.com; | |
} | |
server { | |
listen 80; | |
server_name www.expojunkie.com; | |
rewrite ^(.*) http://expojunkie.com permanent; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment