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

nginx php 配置模板

时间:2015-08-28 00:34:34      阅读:410      评论:0      收藏:0      [点我收藏+]

标签:

server {
    listen 80;
    server_name    www.gaov.com;
    #access_log     logs/www.gaov.com.access.log main;
    location / {
        index index.html index.htm index.php;
        root  /home/wwwroot/www.gaov.com;
    }
    location ~ \.php$ {
            root           /home/wwwroot/www.gaov.com;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /home/wwwroot/www.gaov.com$fastcgi_script_name;
            include        fastcgi_params;
        }
}

 

其中php方面的 root是你的网站目录

fastcig_pass 是与php-fpm进行交互的端口,此处修改也需要修改php-fpm.conf中的相应监听端口

 

nginx php 配置模板

标签:

原文地址:http://www.cnblogs.com/itafter/p/4764848.html

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