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

i am running apache on (for example), but have it set up so reads from /home/, reads from /home/

if i go to (or any other domain) it works fine - shows the correct files.

if i go to (that is, ANY sub domain), it shows the first entry in my vhosts file (so shows the first site i added).

if i go to (its obv. not that ip...), it also shows that first site i added

how can i stop this? i believe just adding a "fake" first entry in my vhosts will still enable connecting to the site via IP or via any subdomain, so that won't work.

share|improve this question

migrated from Nov 2 '09 at 10:42

This question came from our site for computer enthusiasts and power users.

@ineednotes, ensure to associate your account from Super User at –  Arjan Nov 2 '09 at 10:50

1 Answer 1

You can configure a default virtual host and redirect traffic to a sorry page.

<VirtualHost _default_:*>
DocumentRoot /home/defaultvhost
RewriteEngine On
RewriteRule /.* [R]
share|improve this answer

Your Answer


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