server { listen 80; server_name blog.example.com; keepalive_timeout 10; client_max_body_size 30m; access_log /var/log/nginx/blog-access_log main; error_log /var/log/nginx/blog-error_log error; location / { root /srv/www/blog; index index.php index.html index.htm; error_page 404 = /index.php; } location ~* \.(jpg|jpeg|gif|css|png|js|ico)$ { root /srv/www/blog; access_log off; expires 30d; break; } location = /favicon.ico { access_log off; log_not_found off; } location ~* \.php(/|$) { root /srv/www/blog; fastcgi_pass 127.0.0.1:50000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /srv/www/blog$fastcgi_script_name; include /applications/nginx/conf/fastcgi_params; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /srv/www/error; } error_page 404 403 /40x.html; location = /40x.html { root /srv/www/error; } }