I am running an SVN host from my windows box, along with a few local development sites.

The problem I am having, when I have no virtual hosts everything works fine as everything directs explcitly.

When I have one virtual host (for convenience):

NameVirtualHost *:80

<VirtualHost *:80>
 ServerName www.localsite.home
 DocumentRoot "D:/ws/localsite/"
</VirtualHost>

It works fine for localsite.home, but now localhost doesnt correctly work, and everything is redirected to that localsite folder. It also means SVN stops working externally and locally. How do I fix this?

link|improve this question
feedback

2 Answers

Try removing the ServerName option. With this option your one virtual host may not like any other names. If you add additional Virtual hosts in the future keep this one as the first definition. It will catch any undefined names.

link|improve this answer
feedback

The problem is Apache if it cannot find a matching virtualhost will default to the first vitualhost.

I have replaced the first virtualhost with:

<VirtualHost *:80>
    DocumentRoot "D:/ws/"
</VirtualHost>

Everything works fine, but external SVN users are still unable to connect.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.