[sclug] Mod_proxy problems

Mayuresh Kadu mskadu at gmail.com
Wed Jun 13 11:18:33 UTC 2007


Umm. I haven't worked with mod_proxy before. But how is this different from
using ALIAS (aka mod_alias)? Have you considered that?

Extracts from apache docs:

"mod_alias:
This module provides for mapping different parts of the host filesystem in
the document tree, and for URL redirection.
<snipped>
Example:    Alias /image /ftp/pub/image

A request for http://myserver/image/foo.gif would cause the server to return
the file /ftp/pub/image/foo.gif."

where as apache docs for mod_proxy says:

This module implements a proxy/cache for Apache. It implements proxying
capability for FTP, CONNECT  (for SSL), HTTP/0.9, HTTP/1.0, and (as of
Apache 1.3.23) HTTP/1.1. The module can be configured to connect to other
proxy modules for these and other protocols.

regards,

- Mayuresh

On 6/13/07, Peter Brewer <pwb48 at cornell.edu> 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/"
>
> This works to a point with files in the "/var/www/foldernameonserver"
> served
> as http://prettydomain.co.uk/myfile.html.  The problem is when I try and
> access a file in a subfolder
> /var/www/foldernameonserver/css/style.css.  If I
> try and access the file in the following location:
> http://prettydomain.co.uk/css/style.css
>
> Apache errors saying in can't find the URL
> "/foldernameonserver/css/style.css
>
> I hope I'm making some sense!!!  Any magic wand waving appreciated!
>
> Regards
>
> Peter
>
>
>


-- 
My Blogs:
http://mskadu.blogspot.com | http://mytechieself.blogspot.com |
http://digitalcaptures.blogspot.com



More information about the Sclug mailing list