Forum Moderators: phranque
Second - the problem:
Lets say i have a webserver: www.example.com
Lets say i have a second webserver: www.outside.com
How can i bring the two servers together that it looks like that all the files are fetched from www.example.com and that the surfer (who calls www.example.com) doesnīt notice that the files come from two servers:
index.html from www.example.com
picture.jpg from www.outside.com
I think this can be done with mod_proxy and a alias directive, but i am not sure. Canīt find the example. Or is it mod_rewrite?
Thanks for help. Markus.
You could use mod_rewrite, but mod_alias would be simpler.
Be aware that all traffic for the back-end server will pass through the proxying server, and that the back-end server will always see the proxying server as the requestor. So logs and stats on that machine will be useless unless you arrange for it to use the HTTP_FORWARDED_FOR request header to get the original requestor.
You do NOT need to enable a full proxy to make this work -- All you need is a reverse proxy. However, you will need to enable ProxyPassReverse if the back-end server does any redirects.
See Apache mod_proxy [httpd.apache.org] for more info and examples.
Jim