![]() |
VHosts + basedir + PHP4 and PHP5 at same time
Hi everybody,
i have php5 running as apache mod and php4 as cgi. in my apache config i set an open_basedir for each vhost. is it possible to set individual basdirs for php4-cgi too? I want to forbid users to acccess files of other users. all user dirs have the same uid and guid (FTP setup is pureftpd with virtual hosting) |
Can you post your vhost configuration here?
|
In httpd.conf:
Code:
ScriptAlias /php4-cgi "/usr/lib/cgi-bin/php4"a sample of a vhost config: Code:
<VirtualHost *:80>php_admin_value open_basedir /home/www/domain </Directory> was just added for testing but has no effect on php4-cgi... |
I'm not quite sure if open_basedir, safe mode, etc. work for PHP-CGI because it was developed primarily for mod_php. For the CGI versions you can use suExec and suPHP.
|
safe_mode is already working because it was defined in php.ini
I got an idea... maybe it will work with parameters to php4-cgi... |
Now its working fine... the solution if someone is interested:
create a direktory to store a php4 startscript for each user like /var/www/php4 then create a bash script named domain or so in this directory containing Code:
#!/bin/shCode:
ScriptAlias /php4-cgi "/var/www/php4/domain" |
| All times are GMT +2. The time now is 23:17. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.