标签搜索
热门文章
随身助手API源码安装过程出现500错误的问题
2023-02-05 21:43:55 523阅读 0评论 1点赞

下面是根据我的经历,所编写:

我是使用宝塔搭建的,环境如下:

Nginx 1.22.1

MySQL 5.7.40

PHP-7.4.33

phpMyAdmin 5.2

搭建时我按照源码提供的伪静态

location / {
  if (!-e $request_filename){
    rewrite ^(.*)$ /index.php[L,E=PATH_INFO:?$1];
  }
}

除了首页其它页面都出现下面情况:

屏幕截图_20230205_214652.png

屏幕截图_20230205_214326.png

我找了很久,最终发现是伪静态的原因。伪静态如下:

location ~* (runtime|application)/{
    return 403;
}
location / {
    if (!-e $request_filename){
        rewrite  ^(.*)$  /index.php?s=$1  last;   break;
    }
}

刷新页面后就恢复正常了

屏幕截图_20230205_220526.png

评论

取消