Req #49375 [Opn->Fbk]: Mass Virtual Hosting Enhancements

From: Date: Tue, 14 Sep 2021 13:56:21 +0000
Subject: Req #49375 [Opn->Fbk]: Mass Virtual Hosting Enhancements
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236597@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=49375&edit=1

 ID:                 49375
 Updated by:         cmb@php.net
 Reported by:        hervec at gmail dot com
 Summary:            Mass Virtual Hosting Enhancements
-Status:             Open
+Status:             Feedback
 Type:               Feature/Change Request
 Package:            Apache2 related
 Operating System:   Linux
 PHP Version:        5.2.10
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

> is it possible ?

Maybe, but open_basedir isn't a security feature[1], so you're
likely looking for the wrong solution, especially if this is about
shared hosting, what it appears to be.

[1] <https://www.php.net/manual/en/ini.core.php#ini.open-basedir>


Previous Comments:
------------------------------------------------------------------------
[2009-08-26 15:39:32] hervec at gmail dot com

this is not dynamic, it force me to declare more than 1500+ vhost like this :
[HOST=example.com]
php_admin_value open_basedir "/home/example.com"

it is painful !

I want it more like this :

[HOST=_default_]
php_admin_value open_basedir "/restrict"
[HOST=*]
php_admin_value open_basedir "/home/$HOST"

Or maybe using Regex in HOST=

[HOST="^([^.]+\.)*([^\.]+\.[^\.]+)$"]
php_admin_value open_basedir "/home/$2"

is it possible ?

------------------------------------------------------------------------
[2009-08-26 15:11:21] jani@php.net

To have per-host / per-dir settings, just upgrade to PHP 5.3 which already has this feature set for
FastCGI.



------------------------------------------------------------------------
[2009-08-26 15:07:27] hervec at gmail dot com

Description:
------------
I want to be able to set open_basedir value with apache environmental variable. This can permit to
do dynamic restriction, like restrict acces to the DOCUMENT_ROOT value

There was plenty of patches before, who never come to vanilla...


Reproduce code:
---------------
php_admin_value open_basedir "$DOCUMENT_ROOT"
or if you prefer
php_admin_value open_basedir "$SERVER['DOCUMENT_ROOT']"

Expected result:
----------------
restrict access to file in DocumentRoot

Actual result:
--------------
not working


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=49375&edit=1


Thread (6 messages)

« previous php.bugs (#236597) next »