Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Where I work (a webdev company) we have a testing server with a peculiar setup. Which is that requesting

foo.myusername.thisserver.com

will automatically send you to the files located at

/home/myusername/foo/web

on that server. Just creating a new dir in the homedir is enough. No need to edit Apache config or even reboot it. This is very convenient for developing. You just have to check a project out from SVN and you're good to go (most of the time).

I was wondering, how is this done?

Also, if at all possible, I'd like it so that I can override the webroot by editing a file in the app's dir (/home/myusername/foo in this case), for example setting it to

/home/myusername/foo/somedir/webroot

But I don't know how flexible Apache config is in this regard.

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

mod_vhost_aliashttp://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html

share|improve this answer
add comment

Your Answer

 
discard

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.