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 Apache‘s document root
# concurs with nginx‘s one#
#location ~ /.ht {
# deny all;
#}
}
原文:http://www.cnblogs.com/sharesdk/p/7851707.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!