首先并不是所有管理面板入口都是/admin,自动生成的都要在后面加一串字符串,在项目根目录执行以下命令查看
bin/magento info:adminuri
Admin URI: /admin
或者查看 /app/etc/env.php ‘backend.frontName’ 配置
一、先查看/setup/能不能访问到,以下内容?
确保访问到这里没有问题
Magento
Version 2.4.2
Welcome to Magento Admin, your online store headquarters.
Please review Terms & Agreement and read Getting Started to learn how to install Magento using the command line.
二、解决访问不到 /admin 的问题
1,,网站映射目录是根目录,还是/pub目录?
2,.htaccess是否配置正确
3,是否配置伪静态
仅供参考
location / {
index index.html index.php; ## Allow a static html file to be shown first
try_files $uri $uri/ @handler;
expires 30d;
}
location /var/export/ { ## Allow admins only to view export folder
auth_basic "Restricted"; ## Message shown in login window
auth_basic_user_file htpasswd; ## See /etc/nginx/htpassword
autoindex on;
}
location /. { ## Disable .htaccess and other hidden files
return 404;
}
location @handler { ## Magento uses a common front handler
rewrite / /index.php;
}
location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
rewrite ^(.*.php)/ $1 last;
}
其它回答:
https://magento.stackexchange.com/questions/89125/how-to-fix-magento-2-2-0-0-rc-admin-page-not-found-after-installation
安装遇到的其它问题:
https://blog.csdn.net/sphinx1122/article/details/122490095?spm=1001.2014.3001.5501