user www-data; worker_processes 1; error_log /var/log/nginx/error.log debug; pid /var/run/nginx.pid; events { worker_connections 1024; use epoll; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] $status ' '"$request" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; gzip on; gzip_types text/html text/css text/xml text/plain image/gif image/jpeg image/png image/x-icon application/x-javascript; server { listen 80; server_name localhost 192.168.1.100; access_log /var/log/nginx/100.access.log; location / { # set your server root root /pool/www/http; index index.html index.htm index.php; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /pool/www/http; } location ~ /\.ht { deny all; } location ~ .*\.php?$ { include /etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; # modify to your server root or location that store php script fastcgi_param SCRIPT_FILENAME /pool/www/http$fastcgi_script_name; } } }