Apache2 - transparent proxy to another Server domain/subdomain

5th December 2011 – 109 words

Aim: Typing notes.pludoni.de in browser shows the same page as notes.it-jobs-und-stellen.de.

ProxyVia full
#ProxyPreserveHost On
#ProxyPass /assets
ProxyPass / http://notes.it-jobs-und-stellen.de/
ProxyPassReverse / http://notes.it-jobs-und-stellen.de/

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

e.g. this Blog is hosted unter notes.it-jobs-und-stellen.de but should be reachable as notes.pludoni.de. The problem was the option ProxyPreserveHost, which sent the domain notes.pludoni.de to the it-jobs-und-stellen.de-Server. The result was that this server delivered a wrong content, because he do not know anything about “notes.pludoni.de” (resulted in Plesk default page).


Reposted from notes.it-jobs-und-stellen.de