PHP FPM will ignore .htaccess rules for .php files. To ensure that sensitive files cannot be accessed directly it is recommended to exclude certain directories from being handled by PHP FPM by adding the line ProxyPass /config ! to the mod_proxy_fcgi.c section in your apache virtual host config just above the ProxyPassMatch line.
Where is the apache virtual host config file location?
nano /etc/apache2/conf.d/domains/domain.tld.ssl.conf is empty
You can modify those files and restart/reload apache2 to apply the changes, but those files will be overridden when rebuilding the user so, if you want to make those changes permanent, you should create an apache2 template and assign the new template to your domain.
Hestia’s web templates for apache2+php-fpm are located here:
I suppose you are using the default template default.tpl and default.stpl so you should create a new template, modify the template with your desired changes, assign that template to your domain and once done, rebuild your web domain.
cd /usr/local/hestia/data/templates/web/apache2/php-fpm/
cp default.tpl trouble.tpl
cp default.stpl trouble.stpl
Now make the changes in both templates trouble.tpl and trouble.stpl and once done, edit your domain in Web UI and assign the new template (assigning a new template to your domain will rebuild it automatically).