nginx支持php访问的时变成下载而非打开php页面
1、打开终端连接至centos服务器。
2、打开nginx的安装目录。
3、找到之前blog的配置文件。
4、将blog的配置文件做如下修改。
5、检查语法,并且重启nginx。条目如下:server { l坡纠课柩isten 80; server_na罪焐芡拂me blog.test111.com; location / { root html/blog; index index.html index.htm; } location ~ .*\.(php|php5)?$ { root html/blog; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param HTTPS on; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include fastcgi.conf; } }
6、完美解决。
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:46
阅读量:21
阅读量:61
阅读量:27
阅读量:52