Apache suEXEC execute script on user dir basis

apache-2.2suexec

Iam looking for a way to run a script with different users.
I dont want to hardcode the users in the config… and I found some information that it should be possible that the user goes to… lets say:

Code:

http://localhost/~user1/myscript.cgi

and the script gets executes as user 'user1'.

Does anybody know if that is possible?
If not, do I have to make a new vhost config for every user?

Thanks a lot!
Greets,
Kodak

Best Answer

Apache Doc (http://httpd.apache.org/docs/2.2/suexec.html#usage) states that:

Requests for CGI programs will call the suEXEC wrapper only if they are for a virtual host containing a SuexecUserGroup directive or if they are processed by mod_userdir.

Since your URL is of the kind "~user", which is provided by mod_userdir, I guess suExec is already running.