location / { ???????????????index ?index.php index.html index.htm; ???????????????if (!-e $request_filename) { ????????????????????????????????rewrite ?^(.*)$ ?/index.php?s=/$1 ?last; ???????????????????????????????break; ????????????????}if (-d $request_filename){ ???????????????rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;}error_page ??500 502 503 504 404 403 http://localhost;location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { ???????????????expires 30d;}location ~ .*\.(js|css)?$ { ???????????????expires 6h;}location ~ .*\.(php)?${ ???????????????fastcgi_pass ?127.0.0.1:9000; ???????????????fastcgi_index index.php; ???????????????include fcgi.conf;}
nginx配置支持php解析
原文地址:http://blog.51cto.com/yht1990/2140624