muyuto

第 1669 位会员

会员
个人信息
  • 加入于 2019-09-29 13:16:34
  • 最后登录时间 4年前
个人成就
  • 发表文章次数 0
  • 发布回复次数 3
  • 个人主页浏览次数 0
数据库不能初始化4年前
 location / {
        if (!-e $request_filename){
            rewrite ^/(.*)$ /index.php/$1 last;
        }
    }

官方给的这个配置意思是找不到访问页面是就跳转到页面地址前加一个index.php,所以会出这个错误,url变成一长串的index.php/index.php/......这种样子的

我看了一下代码,在数据库配置这个页面对应的control里写的是

			// 进行跳转
            $homeUrl = Yii::$app->homeUrl;
            return $this->redirect($homeUrl.'/database/config/migrate');

所以,如果urlManager配置不对没有实现地址美化,模块配置不对找不到对应的controller的时候都会出我那个错误

数据库不能初始化4年前

我真的啥都没有改啊,nginx的站点配置用的就是你给的页面上写的那一段啊 http://www.fecmall.com/topic/2101

数据库不能初始化4年前

我也是遇到一样的问题,ubuntu系统,通过apt安装的nginx和php7.2-fpm及其需要的扩展

查服务器日志发现如下问题 2019/09/29 02:33:24 [error] 6#6: *8 rewrite or internal redirection cycle while processing "/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/install.php/database/config/migrate", client: 172.18.0.1, server: appfront.fecshoptest.com, request: "GET /install.php/database/config/migrate HTTP/1.1", host: "appfront.fecshoptest.com", referrer: "http://appfront.fecshoptest.com/install.php"

感觉像是nginx的配置里rewrite的问题,可是nginx的配置文件用的是官方提供的标准配置,即地址:http://www.fecmall.com/topic/2101里的

不过配置里的fcgi.conf没有用,用的系统自带的fastcgi.conf。估计是这个文件头上的那几句起了什么作用,不过用了页面里的代码nginx启动报错,显示第4行问题,即那两句

if ($request_filename ~* (.*)\.php) {
    set $php_url $1;
}
if (!-e $php_url.php) {
    #return 403;
}

用了也是同样的错误,汗

Your Site Analytics