mod_php as DocRoot UID ?

#1
Is it possible to run php with mod_php in OLS with
ExtApp Set UID Mode set DocRoot UID ?

Even when I set DocRoot UID php run as www-data user set for server.

regards
 

Pong

Administrator
#2
Do you means OLS 1.4.x, right? There is no mod_php in OLS for that version, but you can certainly run PHP as web server user:greoup instead of Changing to user:group.
no extra setting required within virtual host, simply just inheritage server php external app and script handler from server, where it should be either www-data:www-data, or nobody:nobody depend on your system.

However, if you want to change PHP to SuEXEC mode as user:group, you will need to create external app withit that virtual host and set user:group there. and set handler to the newly created VH level exteranl app.
 
Last edited:

Pong

Administrator
#3
also ExtApp Set UID Mode set DocRoot UID not possible, always run as server uid, in multi-thread mode. change UID require running PHP as a separate process.
 
#4
no I compiled OLS 1.5rc5 with mod_php as module
I created vhost running ext apps as DocRoot UID with two script handlers
1.lsphp7 works as expected with UID/GID owner of DocRoot
2.mod_php run php always with www-data/www-data UID/GID which is set for server during compile OLS
I wonder is it by design?
no way to run as users privileges?
 

Pong

Administrator
#5
You are correct. mod_php only run as webserver UID. To run as PHP SuEXEC, it is not mod_php anymore. You will need to run lsapi for PHP SuEXEC.

The same design as Apache, mod_php only run as apache UID. If you want to run PHP SuEXEC, you will need to change from mod_php to SuPHP, FastCGI or PHP-FPM, right?
 
Top