Slasharguments not working in moodle

I have installed a moodle, but I have a problem with slash arguments, since when entering a url such as https://mi_domain/blocks/xp/index.php/config/1 it indicates a 404 page error.

The following is my stpl template that I have modified to try to activate that argument.

#=========================================================================#
# Default Web Domain Template                                             #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS   #
# https://docs.hestiacp.com/admin_docs/web.html#how-do-web-templates-work #
#=========================================================================#

server {
    listen      %ip%:%web_ssl_port% ssl http2;
    server_name %domain_idn% %alias_idn%;
    root        %sdocroot%;
    index       index.php index.html index.htm;
    access_log  /var/log/nginx/domains/%domain%.log combined;
    access_log  /var/log/nginx/domains/%domain%.bytes bytes;
    error_log   /var/log/nginx/domains/%domain%.error.log error;

    ssl_certificate      %ssl_pem%;
    ssl_certificate_key  %ssl_key%;
    ssl_stapling on;
    ssl_stapling_verify on;

    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
#rewrite for moodle
     rewrite ^/(.*.php)(/)(.*)$ /$1?file=/$3 last;
    #rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;

    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location ~* \.(txt|log)$ {
        allow 192.168.0.0/16;
        deny all;
    }

    # No no for private
    location ~ ^/sites/.*/private/ {
        return 403;
    }

    location / {
        location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
            expires     max;
            fastcgi_hide_header "Set-Cookie";
        }
        
        location ~ \..*/.*\.php$ {
            return 403;
        }

        location ~ [^/]\.php(/|$) {
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
	        fastcgi_split_path_info  ^(.+\.php)(/.+)$;
            try_files $fastcgi_script_name =404;

            fastcgi_pass    %backend_lsnr%;
            fastcgi_index   index.php;
            fastcgi_param SCRIPT_FILENAME $request_filename;
	    fastcgi_param PHP_VALUE open_basedir="/:/home/%user%/web/%domain%/private/moodledata:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/var/www/html:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/phppgadmin:/etc/roundcube:/var/lib/roundcube:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt";
            fastcgi_intercept_errors on;
            include /etc/nginx/fastcgi_params;
            include     %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
        }
    }

    location /error/ {
        alias   %home%/%user%/web/%domain%/document_errors/;
    }

    location ~ /\.(?!well-known\/) { 
       deny all; 
       return 404;
    }

    location /vstats/ {
        alias   %home%/%user%/web/%domain%/stats/;
        include %home%/%user%/web/%domain%/stats/auth.conf*;
    }

    proxy_hide_header Upgrade;

    include     /etc/nginx/conf.d/phpmyadmin.inc*;
    include     /etc/nginx/conf.d/phppgadmin.inc*;
    include     %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
}

Mod edit please put them in code tags

I know there are a few Moodle around here @david-spring and a few more maybe they can help

I have in the past posted some solutions to some Moodle coding problems in this forum. In every case, the problem was with Moodle and not with Hestia. However, over the past few months, it has become clear to me that Moodle coding problems result from poor coding practices that make it very difficult to update the code from PHP 7 to PHP 8. There is also a power struggle going on within the Moodle community that is making matters even worse.
For the time being, I have given up on Moodle. For the past few months, I have been researching alternative Learning Management System options. However, I do not yet have a viable solution. If I eventually find an LMS solution that works well with PHP 8, I will post it on this forum. If you do find a solution to your specific problem, please post it on this forum as many of us would like Moodle to work.

#=========================================================================#

Default Web Domain Template

DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS

Web domains and SSL Certicates — Hestia Control Panel documentation

#=========================================================================#

server {
listen %ip%:%web_port%;
server_name %domain_idn% %alias_idn%;
root %docroot%;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/%domain%.log combined;
access_log /var/log/nginx/domains/%domain%.bytes bytes;
error_log /var/log/nginx/domains/%domain%.error.log error;

include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;

moodle rewrite rules → modified

rewrite ^/(blocks/xp/..php)(/)(.)$ /$1?_r=/$3 last;
rewrite ^/(..php)(/)(.)$ /$1?file=/$3 last;
# rewrite ^/(..php)(/)(.)$ /$1?file=/$3 last;

location = /favicon.ico {
    log_not_found off;
    access_log off;
}

# Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
    allow 192.168.0.0/16;
    deny all;
}

# No no for private
location ~ ^/sites/.*/private/ {
    return 403;
}


location / {
    location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
        expires     max;
        fastcgi_hide_header "Set-Cookie";
    }
    
    location ~ \..*/.*\.php$ {
    return 403;
    }

    location ~ ^(.+\.php)(.*)$ { 
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_split_path_info  ^(.+\.php)(.*)$;
        try_files $fastcgi_script_name =404;

        fastcgi_pass    %backend_lsnr%;
        fastcgi_index   index.php;
        fastcgi_param SCRIPT_FILENAME $request_filename;
    fastcgi_param PHP_VALUE open_basedir="/:/home/%user%/web/%domain%/private/moodledata:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/var/www/html:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/phppgadmin:/etc/roundcube:/var/lib/roundcube:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt";
        fastcgi_intercept_errors on;
        include /etc/nginx/fastcgi_params;
        include     %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
    }
}

location /error/ {
    alias   %home%/%user%/web/%domain%/document_errors/;
}

location ~ /\.(?!well-known\/) { 
   deny all; 
   return 404;
}

location /vstats/ {
    alias   %home%/%user%/web/%domain%/stats/;
    include %home%/%user%/web/%domain%/stats/auth.conf*;
}

include     /etc/nginx/conf.d/phpmyadmin.inc*;
include     /etc/nginx/conf.d/phppgadmin.inc*;
include     %home%/%user%/conf/web/%domain%/nginx.conf_*;

}