Virtualhost subdomain Internal Server Error
- by Andrew
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?