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

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 just wonder if it's possible to define several DocumentRoots for single VirtualHost in httpd.conf and serve them out depending on IP of the visitor?

share|improve this question
up vote 3 down vote accepted

Yes. See mod_rewrite including our very own Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask?

share|improve this answer
Actually I wondered if it's possible to place conditional directly into the VirtualHost definition. – jayarjo Apr 19 '11 at 7:04
@Jayarjo, not that I'm aware of, no. – Chris S Apr 19 '11 at 12:29

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.