Score:1

Apache setting "SetEnv PHP_ADMIN_VALUE open_basedir=path" is not restricted to its virtual host config

us flag

I have an Apache web server installed on my Ubuntu server 18.04 with many virtual hosts configured, I use different open_basedir for each vhost, recently I had to change normal php7.2 to php-fpm to be able to enable http2 since mpm_prefork is not compatible with http2 so I disabled it and used mpm_event and php fast cgi. The point here : I had to switch open_basedir syntax from :

php_admin_value open_basedir /path

To this syntax :

SetEnv PHP_ADMIN_VALUE "open_basedir = /path"

I noticed the new syntax did not work well, many sites were broken, apache error logs showed that the broken pages complained about not allowed to access the files, referring me to the wrong basedir setting, for instance pages on site1 would not work because their path is not allowed in site2, some overlapping took place and I am not sure how to fix it.

The log show something like :

[Wed Aug 25 18:18:29.814771 2021] [proxy_fcgi:error] [pid 24671:tid 139761735845632] [client xx.x.x.x:5539] AH01071: Got error 'PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/var/www/site2/landing.php) is not within the allowed path(s): (/var/www/site1/:/tmp/) in Unknown on line 0PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0Unable to open primary script: /var/www/site2/landing.php (Operation not permitted)'

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.