Using Apache As A Proxy Server - Endzone (
Page 7 of 7 )
If you're in charge of running a small
office network, you might find Apache's built-in proxy server and caching
features fairly useful, especially if all you're looking for is a simple,
efficient solution.
The proxy server is great for enabling Internet
connection sharing across multiple networked workstation, and can also add to
your peace of mind by providing an additional layer of security to your network.
It also provides you with more control over Internet usage, allowing you to
restrict access to "bad" sites, and control which workstations have access to
the Internet. Finally, its logging facilities allow you to monitor Internet
usage, providing you with useful feedback on the performance of your
network.
The caching features can also come in handy, especially if your
users tend to visit the same set of sites on a regular basis. By using the
cached copies, Apache's proxy server can reduce bandwidth consumption, enhance
user perception of network performance, and reduce Internet costs.
Of
course, when all is said and done, the Apache proxy server will always play
second fiddle to the Web server, which still gets the lion's share of the
attention. If you're looking for a practical, robust and efficient solution, and
your requirements aren't too complicated, Apache's proxy server will probably
work for you. If, on the other hand, you're looking for more advanced features
(like access control lists, more detailed logging and so on), you should
consider using squid, which has to be one of the most powerful, full-featured
proxy servers out there today.
I'll be discussing squid in a separate
article soon - but, until then, feast on the following links:
Apache 1.2
documentation for mod_proxy, at
http://httpd.apache.org/docs/mod/mod_proxy.htmlApache
2.0 documentation for mod_proxy, at
http://httpd.apache.org/docs-2.0/mod/mod_proxy.htmlAn
introduction to Web caching, at
http://www.web-caching.com/mnot_tutorial/An
introduction to squid, at
http://linux.oreillynet.com/pub/a/linux/2001/07/26/squid.htmlSee
you soon!
Note: All examples in this article have been tested on
Linux/i686 with Apache 1.3 and Apache 2.0. Examples are illustrative only, and
are not meant for a production environment. Melonfire provides no warranties or
support for the source code described in this article. YMMV!