Created
June 10, 2012 21:53
-
-
Save proton/2907464 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
user nginx nginx; | |
worker_processes 2; | |
timer_resolution 100ms; | |
worker_rlimit_nofile 8192; | |
worker_priority -15; | |
error_log /var/log/nginx/error_log info; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
server_names_hash_bucket_size 33; | |
log_format main | |
'$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $bytes_sent ' | |
'"$http_referer" "$http_user_agent" ' | |
'"$gzip_ratio"'; | |
client_header_timeout 240; | |
client_body_timeout 240; | |
fastcgi_read_timeout 240; | |
send_timeout 10m; | |
connection_pool_size 512; | |
client_header_buffer_size 2k; | |
#proxy_buffer_size 32k; | |
large_client_header_buffers 4 2k; | |
request_pool_size 4k; | |
gzip on; | |
gzip_min_length 1024; | |
gzip_buffers 4 8k; | |
gzip_types text/plain text/xml application/xml application/x-javascript text/javascript text/css text/json; | |
gzip_disable "msie6"; | |
gzip_comp_level 8; | |
gzip_static on; | |
output_buffers 1 32k; | |
postpone_output 1460; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 75 20; | |
ignore_invalid_headers on; | |
index index.html; | |
upstream my_server { | |
server unix:/var/web/my/shared/thin.0.sock fail_timeout=0; | |
server unix:/var/web/my/shared/thin.1.sock fail_timeout=0; | |
server unix:/var/web/my/shared/thin.2.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
client_max_body_size 1G; | |
server_name my; | |
keepalive_timeout 5; | |
access_log /var/log/nginx/my.access_log main; | |
error_log /var/log/nginx/my.error_log info; | |
root /var/web/my/current/public; | |
try_files $uri/index.html $uri.html $uri @my; | |
location @my { | |
proxy_pass http://my_server; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
} | |
expires max; | |
error_page 500 502 503 504 /500.html; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment