Deny access to the content of my dokuwiki folders using a web template

Hello, sorry for my bad English, it is not my first language.

I have a question regarding ngnix web templates:
You see, I have created a web template for the dokuwiki that I have installed on my website. I created this template because I need to modify some directories that appear in my installation folder to not be accessible via the web. I have been following the manual that appears on the dokuwiki and I have created my own ngnix templates by copying the ones that existed in hestiacp by default and implemented them in the web panel but no matter how I modify my template the changes that deny access are not implemented. What could I be doing wrong? Could it be that I’m not setting the path correctly?

I’ve been putting it three different ways:

sudo nano /usr/local/hestia/data/templates/web/nginx/doku.stpl
        location ~ /(data/|conf/|bin/|inc/|vendor/) {
                deny all;
        }
        location ~ /home/username/web/wiki.ouroboroslabs.eu/public_html/(data/|conf/|bin/|inc/|vendor/) {
                deny all;
        }
        location ~ /home/username/web/wiki.ouroboroslabs.eu/public_html/(data|conf|bin|inc|vendor) {
                deny all;
        }

In theory I want things like the content that appears in this link to be inaccessible:
https://wiki.ouroboroslabs.eu/data/pages/wiki/dokuwiki.txt

Hi!
I had to put it as separate blocks to make it work, like this:

cat nginx.ssl.conf_dokuwiki
location ^~ /data {
    deny all;
    return 403;
}
location ^~ /conf {
    deny all;
    return 403;
}
location ^~ /bin {
    deny all;
    return 403;
}
location ^~ /inc {
    deny all;
    return 403;
}
location ^~ /vendor {
    deny all;
    return 403;
}

this file can be created inside web config folder:

/home/theUser/conf/web/wiki.yourdomain.eu/

so the nginx config for the site auto-include it

My God, it worked. Thank you very much wen100k.

How did you discover that you had to do exactly that?
Is it somewhere in the HestiaCP documentation?
I’ve been modifying stpl and conf files all this week, trying to achieve this…
Likewise, thank you very much, you have saved me a lot of headaches.

Well, just trial and error parting from the nginx docs (your approach basically, is the correct way).
But since that doesn’t worked I started again from a working example of just one folder and replicated that like a caveman.