Alias context as another user

#1
Is it possible to run a context ad another suexec user than the vhost user ?

I have vhost user and group as foo and foo respectively. I have a context /webmail/ and I need to run the scripts under this context as another user.


Please suggest the possible solutions ?
 
#2
Here is the solution I used

Aim : I need to use a set of common script like /phpmyadmin , /webmail ,etc,. which are located on my server . Those scripts are not owned by the web server user. So I need to run those scripts under a different user on each virtual hosts

url http://foo.com/info.php -> runs are user foo and group foo
url http://foo.com/webmail/ -> runs as user appuser and group appgroup

Procedure :
Add the following in httpd_config.conf in main configuration

# Apps php hander
extProcessor my-apps {
type lsapi
address uds://run/openlitespeed/lsphp-my-apps.sock
path /usr/local/php/bin/lsphp
autoStart 2
runOnStartUp 3
extUser appuser
extGroup appgroup
include /etc/ols//phplimits.conf # the common php limits configurations
}
scriptHandler{
add lsapi:my-apps my-apps # This is very important
add lsapi:my-apps php
}

Now add the following in your virtual host configuration

context /webmail/ {
location /usr/local/aps/3rdparty/webmail/ # The path to the scripts folders
allowBrowse 1
addMIMEType application/x-httpd-my-apps php
addDefaultCharset off
}

Now restart OLS server and enjoy it


PS: The OLS should have a proper configuration based documentation too. All those documentations are referred using admin ui . That is not for system engineers or integration projects. You can't automate all the settings through another thirdparty application via this admin gui.
 
Top