thinkphp3

血红的双手。 提交于 2020-01-04 03:09:27

如果出现:Fatal error: Call to undefined function imagecreate() in /www/wwwroot/ht5/Lib/ORG/Util/Image.class.php on line 327
说明php.ini的gd扩展没有开启

如果出现404:
则修改配置如下:

server
{
    listen 9227;
    server_name xxx;
    index index.php index.html index.htm default.php default.htm default.html;
    root /www/wwwroot/ht5;

    #SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
    #error_page 404/404.html;
    #SSL-END

    #ERROR-PAGE-START  错误页配置,可以注释、删除或修改
    #error_page 404 /404.html;
    #error_page 502 /502.html;
    #ERROR-PAGE-END

    location / {
             if (!-e $request_filename) {
                 rewrite ^/(.*)$ /index.php/$1;
             }
        }
        location ~ \.php {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi_params;

            set $real_script_name $fastcgi_script_name;
            if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
              set $real_script_name $1;
              set $path_info $2;
            }
            fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
            fastcgi_param SCRIPT_NAME $real_script_name;
            fastcgi_param PATH_INFO $path_info;
        }
    #PHP-INFO-END

    location = /favicon.ico { access_log off; log_not_found off; }
        location = /robots.txt  { access_log off; log_not_found off; }

    #REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效

    #REWRITE-END

    #禁止访问的文件或目录
    location ~ ^/(\.user.ini|\.htaccess|favicon.ico|\.git|\.svn|\.project|LICENSE|README.md)
    {
        return 404;
    }


    #一键申请SSL证书验证目录相关设置
    location ~ \.well-known{
        allow all;
    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
        error_log off;
        access_log /dev/null;
    }

    location ~ .*\.(js|css)?$
    {
        expires      12h;
        error_log off;
        access_log /dev/null;
    }
    access_log  /www/wwwlogs/ht5.log main;
    error_log  /www/wwwlogs/ht5.error.log;
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!