worker_processes 1; worker_rlimit_nofile 10000; error_log logs/error.log crit; pid nginx.pid; events { worker_connections 8192; multi_accept on; } http { # Defaults include mime.types; default_type application/octet-stream; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Log settings access_log on; log_not_found off; # Cache informations about FDs, frequently accessed files can boost performance open_file_cache max=2000 inactive=60s; open_file_cache_valid 60s; open_file_cache_min_uses 5; open_file_cache_errors off; # Tune client timeout setting server_names_hash_bucket_size 128; client_header_buffer_size 1k; large_client_header_buffers 4 16k; client_max_body_size 200m; client_body_buffer_size 1m; client_body_timeout 15s; client_header_timeout 15s; keepalive_timeout 15s; send_timeout 15s; sendfile on; tcp_nopush on; tcp_nodelay on; # Reduce the data that needs to be sent over network gzip on; gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_min_length 1100; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; # Global php upstream upstream PHP_FARM { server 127.0.0.1:9000 weight=1; server 127.0.0.1:9001 weight=1; server 127.0.0.1:9002 weight=1; server 127.0.0.1:9003 weight=1; server 127.0.0.1:9004 weight=1; } # Localhost server { listen 80; server_name localhost; location / { root D:/WebDev/projects/localhost; index index.html index.htm; } error_page 404 500 502 503 504 /50x.html; location = /50x.html { root D:/WebDev/projects/localhost; } location ~ \.php$ { fastcgi_pass PHP_FARM; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } # Load vHosts include conf/vhosts/*.conf; }