Re: [Fwd: Reverse Proxy Configuration]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 6, 2010 at 9:30 PM, John Iliffe <john.iliffe@xxxxxxxxx> wrote:
> I sent the following request for help a couple of weeks back but so far
> no response.  Maybe I didn't make the actual question clear :-(
> Anyhow, I have done quite a bit of experimentation since with the
> following non-results.
>
> What I'm trying to do:
>
> I have a mail server with a web interface; to avoid conflict with Apache
> HTTP I have it on port 8080.  That port is blocked by the firewall so I
> am trying to proxy it to HTTP/80 through Apache.  Internally, the mail
> server is reached as:   http://192.168.1.12:8080 and works OK.
>
> I read the Apache docs and also:
> http://www.apachetutor.org/admin/reverseproxies
> and created the following config file:
>
> NameVirtualHost *:80
>
> # Default host
> <VirtualHost *:80>
>   ServerName www.xxxxx.ca
>   DocumentRoot /httpd/xxxxx
>   ProxyRequests off
>   ProxyPass /mymail/* !
>   ProxyPass /mymail/ http://192.168.1.12:8080
>   ProxyPassReverse /mymail/ http://192.168.1.12:8080

I'm not sure what you are trying to do here with the
  ProxyPass /mymail/* !

This says not to proxy (literally) '/mymail/*'. If you didn't want to
proxy anything below '/mymail/', the correct syntax is:
  ProxyPAss /mymail/ !
although, given you other directives, why you have this one is a mystery.

Also, your ProxyPass{,Reverse} directives aren't right:

  Proxy /mymail/ http://192.168.1..12:8080

This says 'when path begins '/mymail/', substitute '/mymail/' with
'http://192.168.1..12:8080' and proxy to the resultant URL.
When you have a requested URI like '/mymail/kookie', it will attempt
to proxy to 'http://192.168.1..12:8080kookie' - this is what you asked
it to do.

A simple rule I follow is to always keep the trailing '/' matching on
both arguments of ProxyPass and ProxyPassReverse  - if one side has a
trailing '/', so should the other.

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux