How to make templates available for selection in the panel?

Hi, how to make nginx templates available for selection in the panel? For example joomla.tpl from /usr/local/hestia/data/templates/web/nginx/php-fpm

Hi

Please have a look at our docs: https://docs.hestiacp.com/admin_docs/server_management.html#how-do-web-templates-work

What is your server setup Nginx Proxy + Apache? This template is not available.

1 Like

The tricky thing which is not mentioned in documentation:

Itā€™s necessarily to have mega_template_by_me.tpl and mega_template_by_me.stpl both files. If you have only .tpl or only .stpl ā€” it wonā€™t be availiable in CP to choose.

Iā€™ve figured it out empirically while making custom template.

this! the templates in nginx/php-fpm are exactly what the path suggestsā€¦ templates for nginx+php-fpm only servers. if you installed apache as backend server, these templates will never come into play and you might want to create your own apache templates.

this difference exists, because with apache most of the known CMS handle their settings and custom needs via .htaccess and therefore donā€™t need to fiddle with the main vhost config.
with nginx there is no easy user-sided allowance of specific settingsā€¦

It says where the templates are, but I havenā€™t found how to make them visible in the panel for the site?

hst-install.sh --apache yes --nginx yes --phpfpm yes --multiphp yes --vsftpd yes --proftpd no --named yes --mysql yes --postgresql yes --exim yes --dovecot yes --clamav yes --spamassassin yes --iptables yes --fail2ban yes --quota no --api yes --force no --interactive yes

I think that both Apache and phpfpm should work for me ā€¦

there is now way to ā€˜make them visibleā€™ - the system picks and display automatically which templates are available from the correct folder. itā€™s either/or not and :wink:

multiphp -> php-fpm templates
no multiphp -> plain apache templates (mod_php)

see also the other thread.

for future request, please try to not open your request double in different places, as it just raises the amount of work. either ask in an existing topic or open a new thread.

1 Like

In another thread about Apache templates. Here I want to understand how I can use the nginx templates for --nginx yes --phpfpm yes --multiphp yes. I would like to choose a Joomla template when creating a website in HST because it doesnā€™t work correctly for the default template. (/usr/local/hestia/data/templates/web/nginx/php-fpm/joomla.tpl)
If I installed with these options (hst-install.sh --apache yes --nginx yes --phpfpm yes --multiphp yes), can I choose for website with Apache or without it?
Itā€™s a little strange that in the panel for the website a template is selected for both Apache and FPM. They seem to be alternativesā€¦
Web APACHE2 - default
Backend PHP-FPM - PHP-7_4
Proxy NGINX - default
I can see from the monitoring that the PHP-FPM is working, but the nginx template for it (/usr/local/hestia/data/templates/web/nginx/php-fpm) cannot be selected.

Because you have selected to use Nginx as Proxy. See you setup string

--apache yes --nginx yes

Currently means: Nginx on port 80 acts as a proxy to port 8080 for Apache there for you can only select the proxy template (Hosting, default and caching)

If you would like to use ā€œNginx+FPMā€ you should use
--apache no --nginx yes
As command line

PHP FPM isnā€™t a web server it is a processor for PHP and with the different template you can set certain settings for a specific website (Instead setting those settings globally)

1 Like

Maybe then you need to make a choice either Apache or PHP-FPM during installation? I chose both hst-install.sh --apache yes --nginx yes --phpfpm yes and thought I could switch between them! According to the monitoring, I see that when accessing the site, PHP-FPM is working, not Apache, and templates for FPM are not available in the panel. The logic is not yet clear.

Apache is running on port 8080/8443 not accessible from outside.

You canā€™t run 2 different programs on the same port.

With this installation --apache yes --nginx yes --phpfpm yes, Can I switch in some way to Nginx+FPM without Apache?

I watch the top command and there is no Apache process, only the FPM process.
As a result, for example, sites on Joomla do not work correctlyā€¦

If no traffic is on the server Apache wonā€™t be visible in top

systemctl status apache2

to check if it running it could be a config issue.

To disable Apache Easiest method is a reinstallā€¦

no idea what you are trying to do, but I just tested and installed a fresh joomla on a server with hestia using nginx+apache2+multi-php (php-fpm). works out of the box, no special template or configuration needed.

as suggested already, maybe try to think about what you want to achieve or if your joomla is not working, why that would be. the templates are most likely not the solution you are looking for.

small example: you want to adjust certain php settings. with php-fpm this does not work via php_admin_value settings in .htaccess anymore but rather need a .user.ini that gets prepended.
no need to care about the templates though.

you should try to learn a bit more about what does what in a lemp/lamp stack and what the differences are, otherwise youā€™ll run in circles. and I can already guarantue that with pure nginx+php-fpm you will run in even more questions and troubles if you are looking for custom rules, than what you might see with apache2 and the old but gold .htaccess :wink:

1 Like