Created
May 3, 2012 13:20
-
-
Save Chairo/2585561 to your computer and use it in GitHub Desktop.
nginx_proxy.conf
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 www www; | |
worker_processes 1; | |
error_log /home/wwwlogs/nginx_error.log crit; | |
pid /usr/local/nginx/logs/nginx.pid; | |
#Specifies the value for maximum file descriptors that can be opened by this process. | |
worker_rlimit_nofile 51200; | |
events | |
{ | |
use epoll; | |
worker_connections 51200; | |
} | |
http | |
{ | |
include mime.types; | |
default_type application/octet-stream; | |
server_names_hash_bucket_size 128; | |
client_header_buffer_size 32k; | |
large_client_header_buffers 4 32k; | |
client_max_body_size 50m; | |
sendfile on; | |
tcp_nopush on; | |
keepalive_timeout 60; | |
tcp_nodelay on; | |
gzip on; | |
gzip_min_length 1k; | |
gzip_buffers 4 16k; | |
gzip_http_version 1.0; | |
gzip_comp_level 2; | |
gzip_types text/plain application/x-javascript text/css application/xml; | |
gzip_vary on; | |
#limit_zone crawler $binary_remote_addr 10m; | |
proxy_cache_path /home/cache levels=1:2 keys_zone=PROXY:80m inactive=5m; | |
proxy_temp_path /home/cachetmp; | |
server | |
{ | |
listen 80; | |
server_name www.lnmp.org; | |
index index.html index.htm index.php; | |
root /home/wwwroot; | |
location / { | |
include proxy.conf; | |
proxy_cache PROXY; | |
proxy_cache_valid 200 302 3h; | |
proxy_cache_valid 301 1d; | |
proxy_cache_valid any 1m; | |
proxy_cache_key $host$uri$is_args$args; | |
proxy_pass http://www.lnmp.org; | |
} | |
location /status { | |
stub_status on; | |
access_log off; | |
} | |
log_format access '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" $http_x_forwarded_for'; | |
access_log /home/wwwlogs/access.log access; | |
} | |
include vhost/*.conf; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment