Page 1 of 1

Custom nginx template doesn't work

Posted: Wed Jun 13, 2018 12:57 pm
by jurchello
Where are located nginx templates which are located here /home/admin/conf/web/... ?
I added comments to all the templates here /usr/local/vesta/data/templates/web/nginx. The list of templates:
  • caching.sh
    caching.stpl
    caching.tpl
    default.stpl
    default.tpl
    hosting.sh
    hosting.stpl
    hosting.tpl
    http2.stpl
    http2.tpl
    php-fpm
    proxy_ip.tpl
Rebuild vestacp and checked my configs here /home/admin/conf/web/
I've not seen comments inside the configs.
Also I created own template here /usr/local/vesta/data/templates/web/nginx (as a copy of default) and included it into webpanel for one of the domains. Rebuild. The same - new template doesn'r work.
Also my configs don't match to any of the templates (checked all of them). Where the proper templates are located?

Re: Custom nginx template doesn't work

Posted: Thu Jun 21, 2018 11:31 am
by usr999
Try in /usr/local/vesta/data/templates/web/php-fpm/

Re: Custom nginx template doesn't work

Posted: Wed Feb 13, 2019 7:34 am
by Fleuv
usr999 wrote:
Thu Jun 21, 2018 11:31 am
Try in /usr/local/vesta/data/templates/web/php-fpm/
This directory is for PHP-FPM configs not for NGINX configs.

This is the directory the OP is looking for:

Code: Select all

/usr/local/vesta/data/templates/web/nginx/php-fpm/

Re: Custom nginx template doesn't work

Posted: Tue Jan 26, 2021 12:11 pm
by Miguel
Copy and modify file In /usr/local/vesta/data/templates/web/nginx/
The new file name just like "xxx_xxx.tpl" and "xxx_xxx.stpl", don't use "xxx.xxx.tpl" and "xxx.xxx.stpl" (Won't show your custome template name in vesta panel)
finally, restart vesta service by root or sudo: service vesta restart