user www www; worker_processes 2; pid /var/run/nginx.pid; error_log /var/log/nginx.error_log debug | info | notice | warn | error | crit; events { connections 2000; use kqueue | rtsig | epoll | /dev/poll | select | poll; } http { log_format main '$remote_addr - $remote_user [$time_local] ' '"$request" $status $bytes_sent ' '"$http_referer" "$http_user_agent" ' '"$gzip_ratio"'; send_timeout 3m; client_header_buffer_size 1k; gzip on; gzip_min_length 1100; #lingering_time 30; server { server_name one.example.com www.one.example.com; access_log /var/log/nginx.access_log main; rewrite (.*) /index.php?page=$1 break; location / { proxy_pass http://127.0.0.1/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; charset koi8-r; } location /api/ { fastcgi_pass 127.0.0.1:9000; } location ~* \.(jpg|jpeg|gif)$ { root /spool/www; } } }