Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I installed mindtouch using the instructions here and it seems to have broken my Virtual Host configuration. I have several domains running off the same apache instance and this was working fine but now all my domain names resolve to the virtualhost where mindtouch was installed. So mindtouch made all my domain names point to the new mindtouch instance. Grrr!

I use debians default virtual host mechanisms (sites-enabled, etc). Does anyone know what apache directive mindtouch is using to ruin my vh setup? I've scoured all the conf files and there is nothing obvious in apache2.conf or httpd.conf that would cause the behaviour. Did it create a sym-link somewhere that I should destroy?

I should add that I uninstalled the mindtouch packages already but apache persists in redirecting all domains to the first one mentioned in the sites-enabled folder.

thini:~# apache2ctl -S
[Wed Jan 05 13:39:11 2011] [warn] NameVirtualHost *:80 has no VirtualHosts
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:*  www.openancestry.org (/etc/apache2/sites-enabled/openancestry.org:1)
*:*  www.pragmantra.com (/etc/apache2/sites-enabled/pragmantra.com:1)
*:*  services.pragmantra.com (/etc/apache2/sites-enabled/services.pragmantra.com:1)
*:*  www.subversionreports.com (/etc/apache2/sites-enabled/subversionreports.com:1)
*:*  www.thijssen.ch (/etc/apache2/sites-enabled/thijssen.ch:1)
Syntax OK

EDIT: after making the corrections suggested by Niall & DerfK I now get this:

thini:/etc/apache2/sites-enabled# apache2ctl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
 default server www.openancestry.org (/etc/apache2/sites-enabled/openancestry.org:1)
 port 80 namevhost www.openancestry.org (/etc/apache2/sites-enabled/openancestry.org:1)
 port 80 namevhost www.pragmantra.com (/etc/apache2/sites-enabled/pragmantra.com:1)
 port 80 namevhost services.pragmantra.com (/etc/apache2/sites-enabled/services.pragmantra.com:1)
 port 80 namevhost www.subversionreports.com (/etc/apache2/sites-enabled/subversionreports.com:1)
 port 80 namevhost www.thijssen.ch (/etc/apache2/sites-enabled/thijssen.ch:1)
Syntax OK

Whichever file is first in the sites-enabled folder ends up being treated as "default server". It's as if named virtual hosts is disabled.

Resolved with this:

<VirtualHost _default_:80>DocumentRoot /var/www</VirtualHost>
share|improve this question
What's the output of "apache2ctl -S"? –  Niall Donegan Jan 5 '11 at 13:36
@Niall Donegan, updated... –  grenade Jan 5 '11 at 13:43

2 Answers 2

up vote 1 down vote accepted

The first warning is probably the answer. You have NameVirtualHost defined as *:80, however by the looks of things you have <VirtualHost *:*> or similar rather than <VirtualHost *:80> on the bit of config defining each virtual host.

share|improve this answer
If I comment out NameVirtualHost *:80 (which I found in ports.conf) and restart apache, that warning goes away. My problem persists though. What did you mean about the double quotes? –  grenade Jan 5 '11 at 13:54
Sorry, screwed up the formating first time! –  Niall Donegan Jan 5 '11 at 13:56
@grenade: You need both of the commands, but the commands must match, they all need to be *:* or all need to be *:80 –  DerfK Jan 5 '11 at 13:59
Thanks @DerfK, I've fixed that now (everything is *:80) and the warnings have gone away --That always puzzled me. However, I still have the problem that all the domains are resolving to openancestry.org. I'm convinced that Mindtouch added another directive which causes this as openancestry.org was the one where mindtouch was installed. –  grenade Jan 5 '11 at 14:04
It's probably going there first as it's the first alphabetically and there's no more specific match in any of the other vhost config files. If you want a "default" host, create a vhost file the same as the others with no ServerName or ServerAlias defined, and point it to the DocumentRoot where you'd prefer domains to be pointed by default. –  Niall Donegan Jan 5 '11 at 14:08

@Grenade Sorry to hear you are having issues with MindTouch. If you followed the instructions on the wiki page then you could always try "a2dissite dekiwiki" and "a2ensite default" to see if that fixes it. MindTouch does use the sites-enabled symlinks to manage hosts, but it might just be the case that you have a wildcard on the first apache vhost. Let me know if the above helps.

share|improve this answer

Your Answer


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

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