nginx 配置location php 不被解析解决办法

今天配了这个发现php不被解释 

location /wx/ {
 root /data/server/www/backend/channel/wap_wx/app/;
 index index.htm index.php
 rewrite_log on;
 error_log /xxx/logs/nginx_error2.log info;
 }


添加如下:

 


 location ~ ^/wx/.+\.php$ {

 root /data/server/www/backend/channel/wap_wx/app/;
 #rewrite /wx/(.*\.php?) /$1 break;
 include fastcgi.conf;
 fastcgi_pass 127.0.0.1:9000;
 # fastcgi_index index.php;
 fastcgi_param SCRIPT_FILENAME /data/server/www/backend/channel/wap_wx/app/$fastcgi_script_name;
 rewrite_log on;
 error_log /ganji/logs/nginx_error3.log info;
 
}

posted @ 2015-11-14 19:22  QLchan  阅读(2956)  评论(0编辑  收藏  举报