Drupal 8 nginx Template Problems

Hello, playing with a new Drupal 8 install, where I’m planning to migrate an older Drupal 7 site.
Installing any new module or theme, I’m getting in a problem with an error message involving /core/authorize.php/core/authorize.php?

Looking around, it seems a problem with the nginx configuration (so, the Drupal 8 template):

Blockquote This is an nginx configuration issue and discussed intensely on this page Yet curiously no solid solution could be offered. Some guy on an other page proposed a solution. I applied that proposed solution and can confirm that in works!

To apply proposed solution go to your nginx configuration file under

/etc/nginx/sites-available/ directory on Ubuntu and add

rewrite ^/core/authorize.php/core/authorize.php(.*)$ /core/authorize.php$1;

just above the

location ~ \..*/.*\.php$ {
    return 403;
}

block. Location does matter!.. Restart your server:

sudo service nginx restart

and that’s it. The problem solved!

Blockquote

is it possible to update the template?

Sure, if you like, you can send us a pull request over github, just checkout https://github.com/hestiacp/hestiacp/pulls, you will find the default templates here:
https://github.com/hestiacp/hestiacp/tree/master/install/deb/templates/web/nginx/php-fpm

Following the instructions found on
https://forum.vestacp.com/viewtopic.php?f=10&t=9687&p=34470#p34470
I cloned drupal8.tpl and drupal8.stpl to new modified templates in the folder /usr/local/hestia/data/templates/web/nginx/php-fpm called drupal8_mod.tpl and drupal8_mod.stpl
Now the template looks like this (and it works, for those having the same problem… it will simply pop in the template selection).
Will these changes be destroyed by next upgrade?

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*;

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;
}
rewrite ^/core/authorize.php/core/authorize.php(.*)$ /core/authorize.php$1;
location ~ \..*/.*\.php$ {
    return 403;
}

location ~ ^/sites/.*/private/ {
    return 403;
}

location ~ ^/sites/[^/]+/files/.*\.php$ {
    deny all;
}

location / {
    try_files $uri /index.php?$query_string;
}

location ~ /vendor/.*\.php$ {
    deny all;
    return 404;
}        

location ~ ^/sites/.*/files/styles/ {
    try_files $uri @rewrite;
}

location ~ ^(/[a-z\-]+)?/system/files/ {
    try_files $uri /index.php?$query_string;
}

location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
    try_files $uri @rewrite;
    expires max;
    log_not_found off;
}

location ~ '\.php$|^/update.php' {
    fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_pass %backend_lsnr%;
    include         /etc/nginx/fastcgi_params;
}

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

location ~* "/\.(htaccess|htpasswd)$" {
    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.ssl.conf_*;

}

If you use another name, no it will not get overwritten.