serve a file as if it was from another domain?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dolittle
    New Member
    • Sep 2007
    • 54

    serve a file as if it was from another domain?

    Hi,

    A client is requesting the file test.html from the domain example.com

    Can apache return the file test.html but let the client think it is from www.otherDomain .com?

    Thanks
  • docdiesel
    Recognized Expert Contributor
    • Aug 2007
    • 297

    #2
    Hi,

    yes, apache can with the module mod_proxy. It's configured like this:
    Code:
    ProxyRequests On
    ProxyPass        /docs/  http://www.example.com/docs/
    ProxyPassReverse /docs/  http://www.example.com/docs/
    with your vHost using the servername/serveralias www.otherdomain .com. This will make the client think all documents unter /docs/... are residing on your frontend apache server. Btw., this is a nice trick to protect a Micro$oft IIS web server from worms and other attacks by placing an Apache in front of it.

    Regards,

    Bernd

    --

    Apache documentation about mod_expires:

    Comment

    Working...