my current path `



  • this address (index.php) is added to the line after the redirect, but there is no error
  • I didn't do anything to make it happen. In an instant, it just happened and I don't know how to remove it.
  • I already had this once. it was solved by reinstalling magento2
  • I didn't change anything in nginx config
  • .htaccess in /var/www/magento2/app/
    RewriteEngine On
RewriteBase /
<IfVersion < 2.4>
    order allow,deny
    deny from all
<IfVersion >= 2.4>
    Require all denied
  • .htaccess in /var/www/magento2/
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/pub/
RewriteCond %{REQUEST_URI} !^/setup/
RewriteCond %{REQUEST_URI} !^/update/
RewriteCond %{REQUEST_URI} !^/dev/
RewriteRule .* /pub/$0 [L]
DirectoryIndex index.php
  • NGINX config /etc/nginx/config-enable/file:
upstream fastcgi_backend {
         server unix:/var/run/php/php7.4-fpm.sock;

     server {
         listen 80;
         listen [::]:80;

         server_name  magento2 magento2.com www.magento2.com;
         index  index.php;

         set $MAGE_ROOT /var/www/magento2;
         set $MAGE_MODE developer;

         access_log /var/log/nginx/magento2.com-access.log;
         error_log /var/log/nginx/magento2.com-error.log;

         include /var/www/magento2/nginx.conf.sample;
  • please let me know if you need any more information! thanks a lot!
    – esca7a
    Commented Jun 2, 2022 at 10:59

2 Answers 2


Please refer to this article.



i do it that - it helped me to reinstall admin data

bin/magento setup:install
[email protected]

I hope this helps you as it helped me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.