首页 > Web开发 > 详细

nginx配置支持php解析

时间:2018-07-11 22:43:50      阅读:210      评论:0      收藏:0      [点我收藏+]
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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!