Using open_basedir parameters to include a Custom Folder…
My scenario:
All has been working well till I switched from Vesta to Hesta.
How was it working?
I edited/created templates accordingly and in particlular EDITED the open_basedir parameter to include the path to the Custom Folder.
I have tried doing the same here at Hestia to no avail.
Here is my setup:
I have 3 domains, A, B, C under user account XYZ. these three domains share a comon folder (commn_folder_x) that resides at /home/XYZ/commn_folder_x.
I have created custom templates under /usr/local/hestia/data/templates/web/php-fpm.
So i have default1.tpl and PHP7_4_custom.tpl
and added this at the open_dir directive:
php_admin_value[open_basedir] = /home/%user%/.composer:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/private:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/home/%user%/commn_folder_x:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt
Note the added “commn_folder_x” within the parameters.
Went ahead rebuild, updated it via the Control panel to use the custom templates.
In my apllication, if i use $var_custom_path = “/home/XYZ/tmp/:” it works fine.
If i change it to $var_custom_path = “/home/XYZ/commn_folder_x” I get the error The directory (/home/XYZ/commn_folder_x) is not setup properly
If you want to create a custom template for php-fpm, the format is this:
whatever-PHP-7_4.tpl so in your case it would be custom-PHP-7_4.tpl if you don’t use that structure on the template name, Hestia will restart the default php-fpm service instead of php-7.4 so your changes are not bein applied.
I don’t know whether that is the root cause but it is worth to try it.
Then this part as is:
php_admin_value[open_basedir] = /home/%user%/.composer:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/private:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/home/%user%/commn_folder_x:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt.
Then went ahead and selected as follows::
Web Template APACHE2 - default
Backend Template PHP-FPM - custom-PHP-7_4.tpl
Proxy Template - default.
Still getting The directory (/home/XYZ/commn_folder_x/) is not setup properly