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

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

2 Answers 2

up vote 26 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.