I would like apache to send 10.23.45.67/subdomain to /var/www/subdomain

What is the easiest way to do this?

link|improve this question

79% accept rate
feedback

2 Answers

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
</Directory>
link|improve this answer
feedback

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 (subdomain.mysite.com), not the directory after (mysite.com/URI/). So this usage is very confusing...

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

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.