Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

it should be:

Order allow,deny
Allow from all

Also make sure your php is using the right user within your apache(httpd) server on the given directory or it won't have access to the files.

share|improve this answer

Are you sure you want to use UserDir in this situation? The Apache developers discourage it in suexec environments, as there are security implications that can be hard to grok.

We have a FAQ about alternatives to UserDir (which also includes how to make UserDir work):

http://www.virtualmin.com/documentation/web/faq

share|improve this answer

Your Answer

 
discard

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.