I am using Nginx + PHP-FPM 8.1, and I installed a php app into public_html, that has a subfolder “public” which needs to be the document root.
So, I ran
v-change-web-domain-docroot user example.com example.com public
I visit the site and get open_basedir restriction errors, as it is trying to run php files not in the public folder, but within public_html itself.
I load up phpinfo.php and find open_basedir is including:
/home/user/web/example.com/public_html/public
but not
/home/user/web/example.com/public_html
Ok, so I go to /usr/local/hestia/data/templates/web/php-fpm/PHP-8_0.tpl and I see that the template has the missing /home/%user%/web/%domain%/public_html
that I need included. Puzzled, I add /home/%user%/web/%domain%/public_html/public
to this list to see what happens, and in phpinfo.php I end up seeing …/public_html/public/public now included.
It seems that whatever v-change-web-domain-docroot did, it is overriding this phpfpm template and adding /public to any occurance of /public_html… which prevents me from adding just /public_html to the list…
So I gave up doing it right, and I ran v-change-web-domain-docroot user example.com example.com ""
so that the open_basedir value went back to include /public_html itself, and I just edited the root in /home/personal/conf/web/food.zebwalker.info/nginx.conf
to /public_html/public and my webapp just works perfectly. I know that this temp setup will just get wiped soon as that nginx.conf is auto generated… so I want to know how do what I want properly, and how I can get v-change-web-domain-docroot and the open_basedir settings to play nicely.