This module works properly only with mod_php
and prefork
MPM.
The main idea is simple, just use this module together with reverse proxy in front of Apache. Set custom headers from reverse proxy and manage php.ini values, DocumentRoot, ServerName according to headers.
For instance you set ResetHeaders "open_basedir" "X-Document-Root"
and this will set open_basedir
on the fly to value from X-Document-Root
header.
make
make ruid (with mod_ruid2 support)
make nophp (without php support)
make clean
make CFLAGS=-DMOD_RESET_AUTH_KEY='\\\"secret\\\"' (if validation is needed between client/server)
!!! IMPORTANT !!! This module MUST be loaded after mod_php.
LoadModule reset_module /usr/lib64/httpd/modules/mod_reset.so
Reset On
ResetDenyHeader "X-Custom-Header"
ResetHeaders "open_basedir" "X-Document-Root"
ResetHeaders "upload_tmp_dir" "X-Tmp-Dir"
ResetHeader "ServerAdmin" "X-Server-Admin"
ResetHeader "DocumentRoot" "X-Document-Root"
ResetHeader "RUidGid" "X-RUID-User"