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 have the following 2 files on my linux system:

/var/www/index.html =

/var/www/foo/bar/index.html =

I'm trying to figure out how I can set it up in Apache, so that when a user goes to "" they are directed to the "/var/www/foo/bar/index.html" file.


/var/www/index.html =

/var/www/food/bar/index.html =

share|improve this question
up vote 3 down vote accepted

You should clarify your specific needs and current configuration, but the simple way to do this is via mod_alias:

Alias /somedirectory /var/www/foo/bar

If that doesn't work or you need different behavior or more sophisticated logic, then let us know.

share|improve this answer
That works great. Thanks! – flip66 Oct 17 '12 at 18:56

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.