Apache2 custom template Problems

Good day everybody:

I have a website with opencart that requires a custom template in order to set a new open_basedir. I have uploaded my files to the /usr/local/hestia/data/templates/web/apache2/php-fpm/ directory.
When I select my custom template in the hestia panel and click “save”, it returns an apache2 restart error. I have “solved” this error by deleting all the comments in the apache2.conf and apache2.ssl.conf files in my domain folder. The problem is that even avoiding the return of this error, it returns error 500 when accesing my website in a browser, and my custom template, which just adds a couple directories in open basedir, is not working.

I have to say that Vesta had te very same problem, but when deleting the mentioned comments in that files, everything worked ok and my custom templates worked fine. I had problems when renewing letsencrypt certificates, and had to load them manually by changing my templates to default, renewing the certificates, and then change again to my custom template, deleting comments in apache2.conf and former sapache2.conf and saving. Is there any clue to solve this problem?

Thank you very much in advance.

What is your setup?

PHP opendir is set in pool.conf or .user.ini file

Hello eris, thank you for answering. I have a VPS with ubuntu 20.04, with a default Hestia installation on it, I don’t know if with “setup” you mean something else…
Could you kindly specify where is the location of pool.conf and user.ini? I don’t find them

Thank you so much again

.user.ini can be created in the web root (/home/user/web/domain.com/public_html)