Home arrow Site Administration arrow Page 4 - Using Apache As A Proxy Server

Wheat And Chaff - Administration

Apache isn't just the planet's most popular Web server - it'salso one heck of a proxy server. This article explores the process ofinstalling and configuring Apache to act as a proxy server for yournetwork, demonstrating how it can be used to cache frequently-accessedWeb sites, log Internet access and block offensive domains, in additionto serving up Web content. Talk about getting two servers for the priceof one!

TABLE OF CONTENTS:
  1. Using Apache As A Proxy Server
  2. Getting Started
  3. Passing The Packets
  4. Wheat And Chaff
  5. Going Backwards
  6. Cache Cow
  7. Endzone
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 30
June 12, 2002

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
The ability to have all HTTP requests directed outside the network going through a single proxy, which is completely under your control, opens up some interesting possibilities. One of the most common ones involves using the proxy to filter out and reject requests for certain "bad" sites. Here's an example, which uses the very powerful ProxyBlock directive to reject all requests for the Playboy Web site.
ProxyBlock .playboy.com
You can specify multiple sites by separating them with spaces.
ProxyBlock .playboy.com .badboy.com
You can block all sites in one swell foop with
ProxyBlock *
Obviously, this is kinda pointless, especially after all the trouble you've gone to to set up the proxy in the first place - but feel free to try it, if only for the experience.

Any attempt to access one of these blocked sites will fail, with Apache returning a default error page to the client. Here's what it looks like:



Obviously, you can customize this page - simply specify the location of a different error page for all HTTP 403 errors, via the ErrorDocument directive.
ErrorDocument 403 /error403.html
Here's an example of a custom error page, specified using the technique above:



 
 
>>> More Site Administration Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: