I would like apache to send 10.23.45.67/subdomain to /var/www/subdomain
What is the easiest way to do this?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityAdd the following to your apache configuration:
Alias /subdomain/ "/var/www/subdomain"
<Directory "/var/www/subdomain">
# Configuration specific to that directory
</Directory>
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...