Created
April 23, 2014 15:52
-
-
Save terlar/11220946 to your computer and use it in GitHub Desktop.
nginx and prax
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 auto; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
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; | |
# tcp | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay off; | |
keepalive_timeout 65; | |
# timeouts | |
client_header_timeout 3m; | |
client_body_timeout 3m; | |
send_timeout 3m; | |
# max buffers | |
client_max_body_size 50m; | |
client_header_buffer_size 1k; | |
large_client_header_buffers 4 4k; | |
# gzip settings | |
gzip on; | |
gzip_disable "msie6"; | |
gzip_vary on; | |
gzip_min_length 512; | |
gzip_buffers 256 8k; | |
gzip_comp_level 3; | |
gzip_proxied any; | |
gzip_http_version 1.0; | |
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
server_tokens off; | |
# sites | |
server { | |
listen 80; | |
server_name *.dev; | |
location / { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_redirect off; | |
proxy_pass http://localhost:20559; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment