apache2 - Set PHP's open_basedir for all users' public_html via mod_userdir -


i have apache 2 web server allows access public_html directory each user via mod_userdir, this:

<ifmodule mod_userdir.c>     userdir public_html     userdir disabled root      <directory /home/*/public_html>         # [*] configuration here     </directory> </ifmodule> 

i additionally configure php's open_basedir directive forbid file access outside user's homedir. user jim, directive be

php_admin_value open_basedir "/home/jim/" 

question: apache offer way through variable @ spot marked [*] above, following?

    <directory /home/*/public_html>         php_admin_value open_basedir "${apache_current_directory}"     </directory> 

i don't know mod_php, should work. assume apache_current_directory variable supposed point current directory context, placing "." take care of (unless mod php doesn't behave). let me know how goes.

<directory /home/*/public_html>   php_admin_value open_basedir "." </directory> 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -