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 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 admin@sub.project.com
</VirtualHost>

<VirtualHost 127.0.0.1:80>
DocumentRoot C:/xampp/htdocs/project/
ServerName project.com
ServerAdmin admin@project.com
</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.

share|improve this question

migrated from stackoverflow.com May 20 '12 at 9:25

This question came from our site for professional and enthusiast programmers.

2 Answers 2

Your document roots are overlapping. E.g. The file C:/xampp/htdocs/sub/index.php will be part of your first two vhosts. Try:

DocumentRoot C:/xampp/htdocs/default/
DocumentRoot C:/xampp/htdocs/sub/
DocumentRoot C:/xampp/htdocs/project/
share|improve this answer

As the error message indicates, you have a bad RewriteCond/RewriteRule redirect in the .htaccess file of the root folder, DocRoot folder, or one of the sub-folders.

It's looping on itself and after 10 internal redirects, Apache is killing it to protect the process.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.