码迷,mamicode.com
首页 > Web开发 > 详细

nginx配置支持php解析

时间:2018-07-11 22:47:18      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:fast   pre   bre   res   last   man   127.0.0.1   cgi   perm   

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解析

标签:fast   pre   bre   res   last   man   127.0.0.1   cgi   perm   

原文地址:http://blog.51cto.com/yht1990/2140624

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!