Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

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

1 Answer 1

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

 
discard

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.