Created
July 29, 2011 14:38
-
-
Save rodrigodealer/1113941 to your computer and use it in GitHub Desktop.
nginx for node.js using socket.io
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 4; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
server { | |
listen 80; | |
gzip on; | |
gzip_disable "MSIE [1-6]\.(?!.*SV1)"; | |
gzip_comp_level 2; | |
gzip_proxied any; | |
gzip_min_length 1000; | |
gzip_types text/plain text/css application/json text/xml text/javascript; | |
location / { | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
client_max_body_size 10m; | |
client_body_buffer_size 128k; | |
proxy_connect_timeout 6000; | |
proxy_send_timeout 6000; | |
proxy_read_timeout 6000; | |
proxy_buffer_size 4k; | |
proxy_buffers 4 32k; | |
proxy_busy_buffers_size 64k; | |
proxy_temp_file_write_size 64k; | |
send_timeout 6000; | |
proxy_buffering off; | |
proxy_next_upstream error; | |
proxy_pass http://localhost:8081; | |
} | |
location ~ ^/(images|js/jquery|js)/ { | |
root /root/forteschat3/public; | |
expires max; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment