Where is the apache virtual host config file location?

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

These are located in /usr/local/hestia/data/

Example: hestiacp/docs/docs/server-administration/web-templates.md at e2a6ad1494e1e69003c54e55a7264ae0c84e7794 · hestiacp/hestiacp · GitHub

/usr/local/hestia/data/users/username# ls
backup.conf cron.conf db.conf history.log notifications.conf ssl stats.log user.conf web.conf

which file should I edit?

The Apache2 conf for your domain is here (I’ll use example.com as your domain and test as your user):

/etc/apache2/conf.d/domains/example.com.conf
/etc/apache2/conf.d/domains/example.com.ssl.conf

Those files are symbolic links pointing to the real files:

/home/test/conf/web/example.com/apache.conf
/home/test/conf/web/example.com/apache.ssl.conf

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:

/usr/local/hestia/data/templates/web/apache2/php-fpm/

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).

1 Like