Vstats 404 Oops - Page Not Found!

Hello,
I have two sites where I use the following writing rules in:

/home/admin/conf/web/yourdomain.com/nginx.conf_redirect

if ($host != "domain.com") {
   return 301 $scheme://domain.com$request_uri;
}

`client_max_body_size 5G;`

`    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000`
`    location ~ \.php$ {`
`        if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; }`
`        fastcgi_pass unix:/run/php/php8.0-fpm-php8.domain.com.sock;`
`        fastcgi_index index.php;`
`        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;`
`        fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;`
`        include /etc/nginx/fastcgi_params;`
`    }`

`     #location / {`
`        if (!-e $request_filename) {`
`            rewrite ^/(.*) /index.php?_page_url=$1 last;`
`        }`
`     #}`

`    location /files/ {`
`        internal;`
`    }`

`    # these locations would be hidden by .htaccess normally`
`    location /logs/ {`
`        deny all;`
`    }`

But after the addition of writing rules no longer works with me visitor statistics, where I see error 404
How can I fix that?

You should not modify /home/admin/conf/web/yourdomain.com/nginx.conf_redirect

But the template files:

Also

     #location / {
        if (!-e $request_filename) {
            rewrite ^/(.*) /index.php?_page_url=$1 last;
        }
     #}
``
Will only comment out the lines:
    #location / { and } and not the if(!-e request part...

But the template files:
You mean template nginx.conf

nginx: configuration file /etc/nginx/nginx.conf test failed

Dear @MR.Dev,

Hestiacp doesn’t work that way. Please read the docs and follow the @eris advise.

nginx.conf is regularly overwritten upon updates.

The template system is how you customize the ngnix config in hestiacp.