Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
667 views
in Technique[技术] by (71.8m points)

fastadmin修改后台入口提示 模块不存在:admin.php

安装完 fastadmin

修改后台入口文件为 admin.php

访问 /admin.php/index/login?url=%2Fadmin.php 提示 模块不存在:admin.php

断点发现没有走 public/admin.php 这个文件

请问是哪里出了问题?

server {
    listen 80;
    server_name fastadmin.test;
    root "****/public";
    
    index index.html index.htm index.php;
    

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
        # autoindex on;
        if (!-e $request_filename){
             rewrite  ^(.*)$  /index.php?s=$1  last;   break;
        }
    }
    
    location ~ .php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass php_upstream;        
        #fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }
    

    charset utf-8;
    
    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }
    location ~ /.ht {
        deny all;
    }
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

1 Answer

0 votes
by (71.8m points)

我找了半天 网上都没什么答案
最后参考了这个https://ask.fastadmin.net/que...

location / {
                if (!-e $request_filename) {
                rewrite ^(.+?.php)(/.+)$ /$1?s=$2 last;# 加上这一句
                rewrite ^(.*)$ /index.php?s=$1 last;
                break;
            }
          
  }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
...