How do I get PHP to work with UserDir

Posted by Callmeed on Server Fault See other posts from Server Fault or by Callmeed
Published on 2010-08-19T06:41:29Z Indexed on 2011/01/29 23:27 UTC
Read the original article Hit count: 206

Filed under:
|
|

I've got a fresh CentOS 5.5 box and have installed Webmin+VirtualMin 3.79. I've enabled UserDir in apache and the sites are visible via http://ipaddress/~user/ but PHP does not work. (PHP works fine if I visit the site via it's domain)

Here's what I put in my httpd.conf to get where I'm at:

<IfModule mod_userdir.c>
    UserDir public_html
</IfModule>
<Directory /home/*/public_html>
  Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI
  allow from all
  AllowOverride All
  AddHandler fcgid-script .php
  AddHandler fcgid-script .php5
</Directory>

When I try to hit a PHP file, I get a 500 error and the following is logged to /var/log/httpd/error_log:

suexec failure: could not open log file
fopen: Permission denied

Any help/direction is appreciated.

© Server Fault or respective owner

Related posts about apache

Related posts about php