0% found this document useful (0 votes)
111 views2 pages

Apache Proxy

The document discusses forward and reverse proxies in Apache. A forward proxy sits between the client and origin server, forwarding requests from the client to the origin server and returning responses. A reverse proxy appears as a regular web server to clients, deciding where to send requests internally and returning responses as if from itself. Reverse proxies are configured using ProxyPass or RewriteRule with the [P] flag, while forward proxies require ProxyRequests to be turned on and clients configured to use the proxy.

Uploaded by

I@Sydney
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views2 pages

Apache Proxy

The document discusses forward and reverse proxies in Apache. A forward proxy sits between the client and origin server, forwarding requests from the client to the origin server and returning responses. A reverse proxy appears as a regular web server to clients, deciding where to send requests internally and returning responses as if from itself. Reverse proxies are configured using ProxyPass or RewriteRule with the [P] flag, while forward proxies require ProxyRequests to be turned on and clients configured to use the proxy.

Uploaded by

I@Sydney
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Apache Module mod_proxy

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

Forward and Reverse Proxies

Apache can be configured in both a forward and reverse proxy mode.

An ordinary forward proxy is an intermediate server that sits between the client and the
origin server. In order to get content from the origin server, the client sends a request to
the proxy naming the origin server as the target and the proxy then requests the content
from the origin server and returns it to the client. The client must be specially
configured to use the forward proxy to access other sites.

Forward Proxy
ProxyRequests On
ProxyVia On

<Proxy *>
Order deny,allow
Deny from all
Allow from internal.example.com
</Proxy>

A reverse proxy, by contrast, appears to the client just like an ordinary web server. No
special configuration on the client is necessary. The client makes ordinary requests for
content in the name-space of the reverse proxy. The reverse proxy then decides where to
send those requests, and returns the content as if it was itself the origin.
A reverse proxy is activated using the ProxyPass directive or the [P] flag to the
RewriteRule directive. It is not necessary to turn ProxyRequests on in order to
configure a reverse proxy.

Reverse Proxy
ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /foo http://foo.example.com/bar


ProxyPassReverse /foo http://foo.example.com/bar

RewriteRule /foo http://foo.example.com/bar [proxy]

You might also like