Take the 2-minute tour ×

I have seen a few questions on this general topic, but they haven't addressed my case.

I have a server running apache. I want to direct all traffic to one document root, except for traffic to a "directory" (example.com/something), which I want to direct to a different document root. What directives/virtualhosts do I need to do this?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

Can you be a bit more specific about the end goal you're trying to achieve?

Here are some things that might do what you need.

  • Using Alias /something/ "/var/www/second_document_root"

  • Using two VirtualHosts and Redirect http://somesite.com/something http://someothersite.com

  • Using mod_proxy and something like ProxyPass /something/ http://someothersite.com

share|improve this answer
I found that Alias worked shortly after asking, I was waiting until the mandatory 8-hour period was over so I could answer my own question. Thanks though! –  RedBassett Jun 19 '13 at 17:58
add comment

As Christopher Karel has mentioned, Alias was the correct solution to the issue. I was able to set up a single VHost for the main website (example.com), and set and alias for example.com/something using this line:

Alias /something /var/www/something_dir/
share|improve this answer
add comment

Your Answer


