Hi,
I added some rewrite rules to /home/user/conf/web/domain.tld/nginx.ssl.conf file. Everything works fine, but the problem is that these changes will be overwritten at the next Hestia upgrade.
The right way to solve this is to create a new template in the /usr/local/hestia/data/templates/web/nginx/ directory.
However there are several templates there:
caching (.sh, .stpl, .tpl)
default (.stpl, .tpl)
hosting (.sh, .stpl, .tpl)
proxy_ip.tpl
Which of these files do I have to copy?
Do I have to copy them in the same directory?
Which name should I use for the new templates?
Is there anything else I should set after creating the new templates?
BTW I’ve set “wordpress” as template and then I compared the content of both “wordpress” nginx.ssl.conf file and default.stpl and they are totally different… why do you say that default.tpl could be used as a template for WordPress sites?
Content is totally different from one file to the other…
As you are part of the dev team of HestiaCP, can you explain how does Hestia build up the nginx.conf file as the one above?
It must gather the info from somewhere… a file, database data?
@eris I didn’t mean the variables but I was talking about the file structure… they are completely different… anyway, I see that’s quite difficult to have detailed explanations on a chat…
Now I created 2 new templates (tpl and stpl) in the /usr/local/hestia/data/templates/web/nginx/ directory.
To do this, I went to “USERS” page, selected the proper user, from the “Apply to selected” dropdown I selected “Rebuild User Profile” and confirmed.
Now the new template should show up in the “Edit Web Domain > Advanced Options > Web Template” field, right?
But it doesn’t… is there anything else that must be done to make it show in the template list?