Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

In Apache2 is it possible to set multiple ServerNames in one VHost?

I want to setup a "wiki" vhost for an internal wiki.

My network has a ".lan" suffix. How do I get Apache to answer both "wiki" and "wiki.lan" on the same vhost?

share|improve this question
up vote 35 down vote accepted

Use both the ServerName and ServerAlias directives in your virtualhost definition. You would do something like:

<VirtualHost *:80>

    Servername wiki.lan 
    ServerAlias wiki



See Apache Docs – ServerAlias Directive.

share|improve this answer
Thats right! I had forgotten about ServerAlias... – Soviero Jul 27 '11 at 6:41

Add the other names with ServerAlias.

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.