[sclug] Mod_proxy problems

Dickon Hood sclug at splurge.fluff.org
Wed Jun 13 11:36:50 UTC 2007


On Wed, Jun 13, 2007 at 11:53:25 +0100, Peter Brewer wrote:
: I'm having problems with mod_proxy.  

: In some cases I just want to pass a particular subfolder for a domain to a 
: different host on my intranet - in which case the following syntax works 
: fine:

: ProxyPass "/prettyfoldername/" "http://anotherhost.domain.uk/foldernameonserver/"
: ProxyPassReverse "/prettyfoldername/" "http://anotherhost.domain.uk/foldernameonserver/"

: The problems come when I want to pass ALL traffic for a particular domain to a 
: subfolder on a different host.  I had presumed that the following syntax 
: would work:

: ProxyPass "/" "http://anotherhost.domain.uk/foldernameonserver/"
: ProxyPassReverse "/" "http://anotherhost.domain.uk/foldernameonserver/"

Use mod_rewrite and a rewrite rule.  Something akin to:

RewriteEngine on
Rewrite /(.*)$ http://anotherhose.domain.uk/foldernameonserver/$1 [P]

should do it.  Check the flags in the angle brackets; it's been a while
since I last did this.

-- 
Dickon Hood

Due to digital rights management, my .sig is temporarily unavailable.
Normal service will be resumed as soon as possible.  We apologise for the
inconvenience in the meantime.

No virus was found in this outgoing message as I didn't bother looking.



More information about the Sclug mailing list