location / { #rewrite rule for typecho staticize if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; } } location ~ ^.+\.php { fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; //也可以,但不推荐 include fastcgi_params; }