I think it is some nginx configuration that is not right, I tried to create a rewriter, but there are many locations.
- WORK: https://127.0.0.1/
- WORK: https://127.0.0.1/rj/
- WORK: https://127.0.0.1/sp/
- DONT WORK: https://127.0.0.1/rj/customer/account/forgotpassword/
- DONT WORK: https://127.0.0.1/sp/sociallogin/social/login/type/facebook/
Here is my conf:
upstream fastcgi_backend {    server unix:/run/php-fpm/www.sock;
}
server {
    listen 80 reuseport default_server;
    server_name  _;
    root /var/www;
    index index.html index.php;
    location / {        try_files $uri $uri/ /index.php$is_args$args;
    }
    location ~ .php/ {          rewrite ^(.*.php)/ $1 last;
    }
    location ~ (index|get|static|errors/report|errors/404|errors/503|health_check)\.php {        fastcgi_pass    fastcgi_backend;        fastcgi_index  index.php;
        fastcgi_buffers 1024 4k;
        fastcgi_param  PHP_FLAG  "session.auto_start=off \n suhosin.session.cryptua=off";        fastcgi_param  PHP_VALUE "memory_limit=768M \n max_execution_time=18000";        fastcgi_read_timeout 600s;        fastcgi_connect_timeout 600s;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;        include fastcgi_params;        
    }
    error_log /var/log/nginx/debug.log debug;  
    access_log /var/log/nginx/debug.log;
}
if i managed to put a rewriter adding an index.php after each folder sub-store, i think the problem would be solved.
I tried to create a rule to always add index.php, however it downloads instead of being executed.
location / {
try_files $uri $uri/ /index.php$is_args$args @fallback; }
location @fallback {
rewrite ^/(\w*)/(.*)$ /$1/index.php/$2 last; }