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

I tried to create an alias or virtual host to run as different user. Well below is part of apache httpd.conf that doesn't work. Or, is it even possible?

<VirtualHost blah:80>

    user DifferentUser
    group DifferentGroup

    ServerAdmin blah
    DocumentRoot blah
    ServerName blah
    ServerAlias blah
    ScriptAlias /cgi-bin/ blah
    DirectoryIndex index.html index.htm default.htm index.shtml index.php
    ErrorLog logs/blah-error_log
    CustomLog logs/blah-access_log common
    <Directory "/blah/">
      Options Indexes FollowSymLinks MultiViews ExecCGI
      AllowOverride all
      Order Deny,Allow
      Deny from none
      Allow from all
share|improve this question

migrated from Nov 15 '12 at 10:19

This question came from our site for professional and enthusiast programmers.

It's not possible. User and group directives can be set only in server context.

share|improve this answer

You may be able to utilise the mpm-itk module which is available for some Linux distros. Failing that you can usee other technologies for privilege separation e.g. suPHP or some other things here.

share|improve this answer

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.