码迷,mamicode.com
首页 > 其他好文 > 详细

配置ngnix

时间:2016-12-08 17:45:12      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:root   pre   location   www   cat   htm   color   ams   lis   

 

server {
        listen 80;
        server_name     www.aaa.com;
        root    /home/www/...;
        index   index.php index.html index.htm;

        location ~ \.php/ {
                if ($request_uri ~ ^(.+\.php)(/.+?)($|\?)) { }
                fastcgi_pass 127.0.0.1:9000;
                include fastcgi_params;
                fastcgi_param SCRIPT_NAME     $1;
                fastcgi_param PATH_INFO       $2;
                fastcgi_param SCRIPT_FILENAME $document_root$1;
        }
        location ~ \.php$ {
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }

        access_log      /home/www/wwwlogs/www_aaa_com_access.log  access;
        error_log       /home/www/wwwlogs/www_aaa_com_error.log;

}

 

配置ngnix

标签:root   pre   location   www   cat   htm   color   ams   lis   

原文地址:http://www.cnblogs.com/wicub/p/6145693.html

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