简单配置nginx使之支持phpinfo

时间:2016-05-09 12:48:59   收藏:0   阅读:1996
server {
        listen       80;
        server_name  localhost;
        index index.html index.htm index.php;
        root /alidata/www/pro;
        location ~ .*\.(php|php5)?$
        {
                #fastcgi_pass  unix:/tmp/php-cgi.sock;
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi.conf;
                include pathinfo.conf;# 加载phpinfo.conf配置
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
                expires 30d;
        }
        location ~ .*\.(js|css)?$
        {
                expires 1h;
        }
        #α¾²Ì¬¹æÔò
        include /alidata/server/nginx/conf/rewrite/default.conf;
        access_log  /alidata/log/nginx/access/mobile.log;
}

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!