1

I've configured a reverseproxy with apache2. The reverseproxy configuration looks like this:

<VirtualHost *:80>
    ServerName someserver.com

    ProxyRequests Off

    ProxyPass /             http://123.123.123.123/var/www/someserver.com/htdocs/
    ProxyPassReverse /      http://123.123.123.123/var/www/someserver.com/htdocs/
</VirtualHost>

<VirtualHost *:80>
    ServerName subdomain.someserver.com

    ProxyRequests Off

    ProxyPass /             http://123.123.123.123/var/www/someserver.com/subds/subdomain/
    ProxyPassReverse /      http://123.123.123.123/var/www/someserver.com/subds/subdomain/
</VirtualHost>

So now I would like to set diffrent document roots for both virtual hosts on the server (123.123.123.123). I tried to set up virtual hosts on the server but the ServerName-Direktive doesn't work.

Has anybody an idea how i can solve this problem? Im sure there is a simple solution but I don't see it :P Thanks

user3617604
  • 13
  • 1
  • 3

2 Answers2

1

You need to use the ProxyPreserveHost Directive instead, you cannot hard code the document roots like that.

topdog
  • 3,520
  • 17
  • 13
0

Alias for subdirectories (see similar) on same domain http://123.123.123.123:

Alias /folder1 ....