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

时间:2019-09-20
本文章向大家介绍FastAdmin 安装后点登录没有反应怎么办?,主要包括FastAdmin 安装后点登录没有反应怎么办?使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

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

原文地址:https://www.cnblogs.com/F4NNIU/p/11557007.html