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

I have an Apache server with vhosts configured. I want one of my vhosts to answer to two names, and

I could define two vhosts that are exactly the same except or the ServerName attribute in /etc/apache2/sites-enabled but that seems silly to me. Is there I way I can define the vhost once and then add some sort of alias name?

share|improve this question
up vote 2 down vote accepted

ServerAlias is the name of the directive you're looking for.

share|improve this answer
Oh man, that was so easy. I have been searching the web trying to find the directive name, how on earth did I not find it! Doh! :D – jwbensley Nov 10 '11 at 12:08
you must ask the right question. yours was far from it, at least for search engines :) – sysfault Nov 10 '11 at 12:19

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.