Re: Using apache as proxy only on specific folder

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

 



On 5/9/07, Scott Gifford <sgifford@xxxxxxxxxxxxxxxx> wrote:
chiel@xxxxxxx writes:

> Hi all.
>
> I want to make apache2 (port 80) to work like a proxyserver to a other webserver that is running on the same machine on port 3000.
>
> The following works perfectly for this:
> ProxyPass / http://localhost:3000/
> ProxyPassReverse / http://localhost:3000/
>
> But what I want is that apache only send the user to this other webserver when the user hits a specific folder, like
> http://10.0.0.1/otherwebserver
>
> Is this posible in apache2 (2.2.3-4)?

mod_rewrite can do this.  See the [P] "force proxy" flag.

Yes it can. But it is not necessary. Simply use
ProxyPass /otherwebserver http://localhost:3000/
ProxyPassReverse /otherwebserver http://localhost:3000/

(Note that if the back-end server uses non-relative links, they will
get messed up since the client connecting to the proxy will have a
different idea of the document base than the back-end server. You can
fix this with mod_proxy_html if necessary, but it is better to avoid
the problem if you can.)

Joshua.

---------------------------------------------------------------------
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