【PHP】 Magento Admin URI: admin 出现 404 Not Found Nginx

【PHP】 Magento Admin URI: admin 出现 404 Not Found Nginx,第1张

【PHP】 Magento Admin URI: /admin 出现 404 Not Found Nginx

首先并不是所有管理面板入口都是/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)/  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

欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/zaji/5703980.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存