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've just reinstalled my server's OS (Ubuntu 10.04 LTS) and installed Virtualmin using the install script ( Everything on the server is completely vanilla - the only thing I've done after logging into the clean system is to run and enable the userdir Apache module.

I've created a virtual host and logged into its account using SFTP, then created a php file with phpinfo() in it. When I browse to the file I get a 500 Internal Server Error. Virtualmin's default settings use fcgid for executing PHP.

Apache's error.log shows this:

[Fri Jan 27 10:20:46 2012] [notice] mod_fcgid: call /home/username/public_html/info.php with wrapper /home/username/fcgi-bin/php5.fcgi
suexec policy violation: see suexec log for more details
[Fri Jan 27 10:20:52 2012] [notice] mod_fcgid: process /home/username/public_html/info.php(28890) exit(communication error), terminated by calling exit(), return code: 112

and suexec.log has this:

[2012-01-27 10:20:46]: uid: (1000/username) gid: (1000/username) cmd: php5.fcgi
[2012-01-27 10:20:46]: cannot get docroot information (/home/username)

and the virtual host's error_log has this:

[Fri Jan 27 11:07:02 2012] [warn] [client] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Fri Jan 27 11:07:02 2012] [error] [client] Premature end of script headers: info.php

Obviously the problem is with suexec, but I've been playing about with this server for a few days trying to get the config right (and having little success) and this time I'm going to seek help before I touch anything and potentially make it worse :)

Any help would be really appreciated :)

share|improve this question
up vote 0 down vote accepted

Please check that the apache2-suexec-custom module is installed. Also, please check the contents of the /etc/apache2/suexec/www-data file:

# The first two lines contain the suexec document root and the suexec userdir
# suffix. If one of them is disabled by prepending a # character, suexec will
# refuse the corresponding type of request.
# This config file is only used by the apache2-suexec-custom package. See the
# suexec man page included in the package for more details.

I suppose you are hosting the sites in the /home directory? If not, you would need to adjust the configuration.

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.