Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have seen all other questions around this topic, but none of the answers have worked.

Situation: VPS on 1 IP, debian wheezy 7 running with apache2.

Even simple virtualhost will not work, as named in sites-enabled "":

<VirtualHost *:80> ServerName ServerAlias DocumentRoot /var/www/domain </VirtualHost>

Output of apache2ctl -S :

VirtualHost configuration:     is a NameVirtualHost
default server (/etc/apache2/conf.d/owncloud5-ssl.conf:1)
port 443 namevhost (/etc/apache2/conf.d/owncloud5-ssl.conf:1) (/etc/apache2/sites-enabled/
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
     default server (/etc/apache2/sites-enabled/000-default:8)
     port 80 namevhost (/etc/apache2/sites-enabled/000-default:8)
     port 80 namevhost (/etc/apache2/sites-enabled/
     port 80 namevhost (/etc/apache2/sites-enabled/
Syntax OK

Still is the index.html in /var/www served as the default virtual host (domain1). Which should indeed be the catch all virtual host. But domain2 and subdomains of both domains are not picked up by apache2. All domains have an A-name in DNS setting, all pointing to same public IP. All resolves to this ip and to default virtual host.

share|improve this question

If i remember this is called virtualhost over-laping, when i used NameBased virtual host, i solved the problem creating a simple default virtualhost like this

<VirtualHost _default_:*>
   DocumentRoot /www/default

for more information you can read apache official docs

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.