How to Use Apache as a Proxy
A proxy server is used to keep the server behind the proxy anonymous for security purposes and to speed up access to a resource via caching. There are different types of proxies that control how information is passed to and from the server behind the proxy. A content filtering proxy ensures that information coming through the proxy conforms to an "acceptable use policy." A reverse proxy can be used to accelerate SSL encryption or handle load balancing. In order to use the Apache HTTP server as a proxy, you must first load the mod_proxy module.
Instructions
-
-
1
Open the Apache configuration file ("httpd.conf") in a text editor. Windows users will find the file at "C:\Program Files\Apache Group\Apache2\conf\httpd.conf." Linux and Unix users will find the the file at "/etc/httpd/httpd.conf."
-
2
Load the "mod_proxy" modules by typing the following lines in the LoadModules directive section:
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
Change the path to the .so files to reflect your file setup. -
-
3
Add the following lines in the main configuration section of the httpd.conf file to create a forward proxy:
ProxyRequests On
ProxyVia On
<Proxy *>
Order deny,allow
Deny from all
Allow from internal.site.com
</Proxy> -
4
Save and close the "httpd.conf" file.
-
5
Restart the Apache server.
-
1