my current path `
http://magento2/index.php/router/controller/action
preface
- 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>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
- .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;
}