Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

httpd.conf file:

LoadModule fcgid_module modules/
AddHandler fcgid-script .php
FCGIWrapper /usr/local/php5 .php

# manual
MaxRequestsPerProcess 1000
FcgidMaxProcesses 200
FcgidProcessLifeTime 7200
MaxProcessCount 500
FcgidIOTimeout 400
FcgidIdleTimeout 600
FcgidIdleScanInterval 90
FcgidBusyTimeout 300
FcgidBusyScanInterval 80
ErrorScanInterval 3
ZombieScanInterval 3
DefaultMinClassProcessCount 0
DefaultMaxClassProcessCount 3
MaxRequestLen 20468982

<VirtualHost *>
    ServerName hostname
    DocumentRoot /home/web
    <IfModule mod_suphp.c>
        suPHP_UserGroup web web
         SuexecUserGroup web web
    UserDir disable

and this is my wrapper:

exec /usr/local/bin/php

my error is:


[2019-09-03 06:55:28]: user mismatch (daemon instead of www)


suexec policy violation: see suexec log for more details
[Tue Sep 03 06:55:28 2019] [warn] [client] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Tue Sep 03 06:55:28 2019] [error] [client] Premature end of script headers: phpinfo.php


I've edited:

 /usr/local/apache2/bin/suexec -V
 -D AP_GID_MIN=100
 -D AP_LOG_EXEC="/usr/local/apache2/logs/suexec_log"
 -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
 -D AP_UID_MIN=100

but no I get no errors and nothing found...

share|improve this question
It's not an answer but an advice. You should consider apache2-mpm-itk instead of suexec and fcgid. It allows you to run each of your vhost under a separate uid and gid. It's far more easy to use than fcgi and suexec. – Stone Feb 1 '12 at 20:30

The suexec file indicates that it will only function if the underlying user is www. It appears that the website is running as daemon. You can change this by putting in user www in the httpd.conf file. BTW, that httpd.conf file looks pretty empty, there are probably other files being included or attached elsewhere in the directory you found it in. This might be the place where a user directive has already been placed.

Your wrapper shell will definitely return an error as all it does it start the php program. Which I am not sure what it would do without a program to run. Apache expects the output from any program, to contain the proper HTTP headers, these will not be generated automatically.

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.