s5h.net

“fresh linux news and advice.”


puce2008-09-04 apache as squid?

Some time ago I would make programs to do conditional URL rewriting for squid and I can't say I've had any major problems with it as a HTTP proxy. Some people might have different views but I honestly can't say I've had any reason to dislike it like this.

Lately I found out about mod_proxy allowing Apache to work as a proper HTTP proxy. Well, it's dead handy.

Simply compile apache with mod_proxy and mod_proxy_http (or any other protocols you're interested in). Then add something like the following to your httpd.conf file:

<IfModule mod_proxy.c>
        ProxyRequests On

        <Proxy *>
                Order deny,allow
                Allow from 192.168.0.0/24
        </Proxy>
        ProxyVia On
</IfModule>