Virtualhost subdomain Internal Server Error

Posted by Andrew on Stack Overflow See other posts from Stack Overflow or by Andrew
Published on 2014-08-25T15:03:43Z Indexed on 2014/08/25 16:20 UTC
Read the original article Hit count: 177

Filed under:
|
|

I am trying to set up user generated sub domains for my PHP application.

When I go to sub.domain.com and if I upload an index.html file it works fine, however if I use index.php it gives me a "Internal Server Error 500" message

I have done the steps below to get subdomains working

STEP 1:

Edited my DNZ zone file and appended *.domain.com. IN A 91.111.111.111

STEP 2:

Appended to httpd.conf the following:

<VirtualHost 91.111.111.111:80>
    ServerName domain.com
    ServerAlias *.domain.com
    DocumentRoot /home/domain/public_html/sub
    <Directory "/home/domain/public_html/sub">
        Options -Indexes 
        Options FollowSymLinks
        AllowOverride All
    </Directory>
</VirtualHost>

Step 3:

Tested by uploading an index.html file to the document directory in step 2, and works fine. Tried with an index.php gives a internal server error and then I looked into Apache error log and shows error for a redirect loop more than 10 times

Update: getting this error:

No user or group set - set suPHP_UserGroup

Any ideas why I can not use any .php file in the directory?

© Stack Overflow or respective owner

Related posts about php

Related posts about apache