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 would like apache to send to /var/www/subdomain

What is the easiest way to do this?

share|improve this question
up vote 0 down vote accepted

Add the following to your apache configuration:

Alias /subdomain/ "/var/www/subdomain"
<Directory "/var/www/subdomain">
    # Configuration specific to that directory
share|improve this answer

You're looking for the Alias directive which maps requested URIs to local directories outside of the DocumentRoot.

For example:

Alias /subdomain/ /var/www/subdomain/

As an a-side, a subdomain is the part before the domain (, not the directory after ( So this usage is very confusing...

share|improve this answer
Indeed. At work we use a proxy, so I can't do local config to point my computer to a different I can't work with domain names...I have to use my server's ip. – Kevin Brown Jun 13 '11 at 15:01

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.