I ran into a small problem upgrading PHP from 5.3.5 to 5.3.10 on a MediaTemple CentOS VPS today. The upgrade completed without any errors, but when I reloaded the site I got a “500 Internal Server Error” message. It was the stock installation, so I’m not sure which module it was using or what repository it came from, but I was upgrading it from the Atomic repository, which loads the FastCGI module by default. The odd thing is that it worked fine on the dev VPS, but not on production.
It turned out to be an easy fix once I figured out the problem, though; I just had to change the ownership of /var/www/cgi-bin and it’s contents so that the apache user could execute cgi_wrapper.
Here’s what was turning up in the error logs:
Apache vhost error_log
[warn] [client xx.xx.xx.xx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[error] [client xx.xx.xx.xx] Premature end of script headers: index.php
/var/log/httpd/error_log
suexec policy violation: see suexec log for more details
/var/log/httpd/suexec_log
uid: (10001/username) gid: (505/505) cmd: cgi_wrapper
/var/log/httpd/suexec.log
target uid/gid (10001/505) mismatch with directory (0/0) or program (0/0)
uid: (10001/username) gid: (505/505) cmd: cgi_wrapper
Hola, en tu entrada pone que tiene fácil solución, pero yo no veo ninguna solucion. ¿Cual es la solucion?
Hi Lorenzo, the solution is to change the ownership of /var/www/cgi-bin and its contents so that the apache user can execute cgi_wrapper.
Thanks so much! cat-ing out the suexec.log showed me exactly what the cause of my 500 error was.