当前位置 : 主页 > 网络编程 > PHP >

yaf+nginx配置文件实例

来源:互联网 收集:自由互联 发布时间:2021-06-28
gistfile1.txt server { listen 80; #listen [::]:80; server_name *.a.com; index index.html index.htm index.php default.html default.htm default.php; root /web/wxgroup/public; include other.conf; #error_page 404 /404.html; location ~ .*\.php(/
gistfile1.txt
server
    {
        listen 80;
        #listen [::]:80;
        server_name *.a.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /web/wxgroup/public;

        include other.conf;
        #error_page   404   /404.html;

        location ~ .*\.php(/|$)
        {
            # comment try_files $uri =404; to enable pathinfo
            # try_files $uri =404;
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi.conf;
           # include pathinfo.conf;
        }
        if (!-e $request_filename) {
         rewrite ^/(.*)  /index.php/$1 last;
         }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

        location ~ .*\.(js|css)?$
        {
            expires      12h;
        }

        access_log  /home/wwwlogs/a.com.log  access;
    }
上一篇:微信授权
下一篇:本地配置虚拟域名
网友评论