lnmp搭载TP5.0.2

浏览:440 发布日期:2018/09/11 分类:ThinkPHP5专区 关键字: pathinfo模式 thinkPHP问题 lnmp
lnmp搭载TP5.0.2,设置好虚拟主机后,访问虚拟域名www.xxxx.com是空白页没有报错,而访问localhost/xxx/public/index.php可以访问主页server
    {
        listen 80;
        #listen [::]:80;
        server_name www.jianjia.com ;
        index index.html index.htm index.php default.html default.htm default.php;
        root /home/wwwroot/default/jianjia/public/;

        include rewrite/thinkphp.conf; # 引入了thinkPHP的路由重写配置
        #error_page   404   /404.html;

        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

        include enable-php-pathinfo.conf; # 开启了路由模式,php.ini文件中的配置cgi.fix_pathinfo=1已经更改

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

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

        location ~ /.well-known {
            allow all;
        }

        location ~ /\.
        {
            deny all;
        }

        access_log  /home/wwwlogs/www.jianjia.com.log;
最佳答案
评论( 相关
后面还有条评论,点击查看>>