Re: virtual host use of php
| From: | Estelle Martin | Date: | Fri, 07 Jul 2000 08:14:40 +0000 |
| Subject: | Re: virtual host use of php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5336@lists.php.net to get a copy of this message | ||
Hi,
There are several things you have to do. First, in the php.ini, you
have to set :
safe_mode = On
safe_mode_exec_dir = /pathtoallvirtualhosts/nothing ;an empty
directory
safe_mode_allowed_env_vars = PHP_
doc_root = /pathtoallvirtualhosts/
user_dir = /pathtoallvirtualhosts/
Then for each virtual host, in httpd.conf define a directory with the
following instructions:
<Directory /pathtoallvirtualhosts/virtualhost.com>
AddType application/x-httpd-php3 .php3 .php
AddType application/x-httpd-php3-source .phps
php3_open_basedir '/pathtoallvirtualhosts/virtualhost.com'
</Directory>
This allows the use not to go out of their own directory, not to see
other
user's files, and it seems to me that is safe.
Please let us know if something does not correspond to what you think to
be secure.
Estelle
John Hogan wrote:
>
> I'd like some feedback on giving Virtual Hosting clients access to PHP...
>
> We have a small server farm on which we host around 500 or so domains. I'd
> like to offer PHP/MySQL as part of an advanced hosting plan, but I'm
> concerned about the security risks involved. For example, how do I turn off
> access to the whole of the server tree? (I don't want someone accessing the
> /etc/passwd file)
>
> I appreciate your feedback.
>
> - John Hogan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
---------------------------------------------------------------------
___/ __ / ___/ / Estelle Martin
/ / / / / Chaire de Statistique Appliquee
___/ ___/ ___/ / DMA-EPFL
/ / / / CH-1015 Lausanne
____/ _/ _/ ____/ Switzerland
ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE mailto:estelle.martin@epfl.ch
phone: 41-21-693.27.85
Swiss Federal Institute of Technology fax: 41-21-693.42.50
http://statwww.epfl.ch/morgenthaler/Nelle.shtml
---------------------------------------------------------------------