Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:



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

share|improve this question

Apache Doc ( 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.

share|improve this answer
Hi! Thanks for your answer! Yes, suExec is running and working with the SuexecUserGroup for the specified user. So when I get this right... this means that when I have mod_userdir configured it will work as I want? – Blame Oct 22 '13 at 11:16
You already have mod_userdir configured, otherwise the /~user/ URL wouldn't work – Capsule Oct 22 '13 at 13:22
It doesn´t work yet... I was just saying I would like to configure it as /~user/. Ok, I will just try it and report back... – Blame Oct 22 '13 at 14:13
Once you will have mod_userdir running, suExec will run too. – Capsule Oct 28 '13 at 9:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.