I downloaded and installed XAMPP, and to keep my projects nicely separated I want to create a VirtualHost for each one based on its future domain name. For example, in my first project (we'll say it's project.com) I've put this in my Apache configuration:
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1:80>
DocumentRoot C:/xampp/htdocs/
ServerName localhost
ServerAdmin admin@localhost
</VirtualHost>
<VirtualHost 127.0.0.1:80>
DocumentRoot C:/xampp/htdocs/sub/
ServerName sub.project.com
ServerAdmin
[email protected]
</VirtualHost>
<VirtualHost 127.0.0.1:80>
DocumentRoot C:/xampp/htdocs/project/
ServerName project.com
ServerAdmin
[email protected]
</VirtualHost>
And this in my hosts file:
# development
127.0.0.1 localhost
127.0.0.1 project.org
127.0.0.1 sub.project.org
When I go to project.com in my browser, the project loads up successfully. Same if I go to sub.project.com. But, if I navigate to: http://project.com/register (one of my site pages) I get this error:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
The error log shows this:
[Sun May 20 02:05:54 2012] [error] [client 127.0.0.1] Request exceeded
the limit of 10 internal redirects due to probable
configuration
error. Use 'LimitInternalRecursion' to increase the limit if
necessary. Use 'LogLevel debug' to get a backtrace., referer:
http://project.com/
Sun May 20 02:05:54 2012] [error] [client
127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable
configuration error. Use 'LimitInternalRecursion' to increase
the limit if necessary. Use 'LogLevel debug' to get a backtrace.,
referer: http://project.com/
Any idea what config items I got wrong or how to get this working? It happens on any page that's not in in the root directory of project.com. Thanks.