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.

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

2 Answers 2

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

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

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.