user nginx nginx; worker_processes 2; timer_resolution 100ms; worker_rlimit_nofile 2048; error_log /var/log/nginx/error.log info; events { worker_connections 2048; use epoll; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] ' '"$request" $status $bytes_sent ' '"$http_referer" "$http_user_agent" '; gzip on; gzip_min_length 4096; gzip_buffers 16 8k; gzip_types text/css text/xml application/x-javascript text/plain application/xml; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; reset_timedout_connection on; limit_req_zone $binary_remote_addr zone=limreqz:10m rate=10r/s; fastcgi_cache_path /cache levels=1:2 keys_zone=FC_ZONE:10m inactive=25m max_size=120m; server { listen *:80; server_name 10.0.0.153; access_log /www/logs/nginx-access.log main; root /www/html; index index.php; limit_req zone=limreqz burst=30 nodelay; location ~ \.php$ { if ( -f $request_filename ) { fastcgi_pass unix:/var/tmp/php-fcgi.sock-1; } include /etc/nginx/fastcgi-params.conf; fastcgi_cache FC_ZONE; fastcgi_cache_valid 200 301 302 1m; fastcgi_cache_key $request_uri; fastcgi_temp_path /cache 1 2; } location ~* ^.+\.(txt|css|jpg|html|gif|png|js|swf|xml)$ { expires max; log_not_found off; } } }