首页 > Web开发 > 详细

Nginx PHP支持

时间:2017-11-17 15:44:19      阅读:222      评论:0      收藏:0      [点我收藏+]

Nginx 支持 PHP

server {
server_name www.www1.com www1.com;
location / {
index index.php  index.html;
root  /web/www/www1.com
}
location ~ \.php$ {
root           html;
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
     //    fastcgi_param 放置PHP动态程序的主目录,也是scripts$fastcgi_script_name 前面指定的目录;
include        fastcgi_params;
    //    fastcgi 进程的参数配置文件;
  }
# deny access to .htaccess files,
if Apaches document root # concurs with nginxs one # #location ~ /\.ht { # deny all; #} }

 

Nginx PHP支持

原文:http://www.cnblogs.com/sharesdk/p/7851707.html

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