You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Igor Leturia <IG...@emun.com> on 2002/04/21 17:32:29 UTC

Newbie question - Proxy

  Hi!

  I've got a problem with my web server which I think, though I'm not
sure, Apache can solve. But I don't want to read all the docs just to
know if Apache does what I need, so I decided to ask to this list.

  I've got Zope and IIS installed in my server, the first in port 8080
and the second in port 81.  I need all traffic from the outside to my
webserver to be on port 80 (the reason is that I observed that some of
the clients that need to access my server have firewalls that block all
ports except 80), so I thought I could install Apache as front-end
server in port 80 and make Apache act as a proxy that will pass the
requests to the other servers and return the answers through port 80. As
far as I know, this is possible with the mod_proxy module, isn't it? And
what would be the exact commands in httpd.conf to make the requests to
'exchange' folder go to IIS in port 81 and all the rest to go to Zope in
port 8080?

  Though I'm almost sure that the above mentioned proxy function is
possible with Apache, I don't know if this other thing is possible. Even
if the Apache proxy would handle all traffic with the clients through
port 80, if the pages Zope or IIS serve have got images and other things
with absolute URLs with ':81' and ':8080' inside, then the images and
the other things aren't served through Apache and port 80, and they
aren't done properly if all ports except 80 are blocked. Can Apache
change these absolute URLs inside the pages before serving the pages to
the client? Is this possible with mod_rewrite? What would be the
commands in that case?

  I know they might be very simple questions for an expert, but for a
newbie it would mean reading lots of docs and lots of trying, so if
anyone could help me I would be very grateful.

  Thanks in advance,

						Igor Leturia

---------------------------------------------------------------------
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Newbie question - Proxy

Posted by Daniel Lopez <da...@rawbyte.com>.
>   I've got Zope and IIS installed in my server, the first in port 8080
> and the second in port 81.  I need all traffic from the outside to my
> webserver to be on port 80 (the reason is that I observed that some of
> the clients that need to access my server have firewalls that block all
> ports except 80), so I thought I could install Apache as front-end
> server in port 80 and make Apache act as a proxy that will pass the
> requests to the other servers and return the answers through port 80. As
> far as I know, this is possible with the mod_proxy module, isn't it? And
> what would be the exact commands in httpd.conf to make the requests to
> 'exchange' folder go to IIS in port 81 and all the rest to go to Zope in
> port 8080?

What you want is called a reverse proxy, you will need the ProxyPass and
ProxyPassReverse directives
First make sure the proxy module is loaded in Apache, then add the following
to your server configuration and restart the server:

ProxyPass /exchange http://yourdomain.com:8080/exchange
ProxyPassReverse /exchange http://yourdomain.com:8080/exchange

ProxyPass / http://yourdomain.com:81
ProxyPassReverse / http://yourdomain.com:81

(The proxypass directives are required to appropriately handle redirects
from the backend servers)

>   Though I'm almost sure that the above mentioned proxy function is
> possible with Apache, I don't know if this other thing is possible. Even
> if the Apache proxy would handle all traffic with the clients through
> port 80, if the pages Zope or IIS serve have got images and other things
> with absolute URLs with ':81' and ':8080' inside, then the images and
> the other things aren't served through Apache and port 80, and they
> aren't done properly if all ports except 80 are blocked. Can Apache
> change these absolute URLs inside the pages before serving the pages to
> the client? Is this possible with mod_rewrite? What would be the
> commands in that case?

Nope, the apache proxy currently does not go modify the content being served
by the proxy, though Apache 2 filtering capability would make it possible in
the future.

>   I know they might be very simple questions for an expert, but for a
> newbie it would mean reading lots of docs and lots of trying, so if
> anyone could help me I would be very grateful.

You should at least try first to read the docs, they are not that hard :)
and that will also increase the chances of getting a response

http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypass

---------------------------------------------------------------------
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org