当前位置 : 主页 > 网页制作 > HTTP/TCP >

FastAdmin 安装后点登录没有反应怎么办?

来源:互联网 收集:自由互联 发布时间:2021-06-16
FastAdmin 安装后点登录没有反应怎么办? 很多小伙伴安装后点“登录”没有反应。 这个 URL 是对的,但是页面就是不改变。 如果这时候点击 URL 变了,那没有到登陆界面,一般是 URL 重写

FastAdmin 安装后点登录没有反应怎么办?

很多小伙伴安装后点“登录”没有反应。

这个 URL 是对的,但是页面就是不改变。

如果这时候点击 URL 变了,那没有到登陆界面,一般是 URL 重写问题。

一般如果是 Apache 服务器,FastAdmin 是有默认的重写规则。

一般这个问题出现在 NGINX 的服务器上,需要对 NGINX 的重写进行配置。

server {
        listen       80;
        server_name  www.fa.com *.fa.com;
        root   "C:/phpstudy/WWW/fastadmin/public";
        location / {
            index  index.html index.htm index.php;
                #主要是这一段一定要确保存在
                if (!-e $request_filename) {
                    rewrite  ^(.*)$  /index.php?s=/$1  last;
                    break;
                }
                #结束
            #autoindex  on;
        }
        location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }
}

这个问题在 FastAdmin 官方文档中的 FAQ 有写。

https://www.cnblogs.com/F4NNIU/p/11557007.html

网友评论