O'Reilly logo

Squid Proxy Server 3.1 Beginner's Guide by Kulbir Saini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring Squid

Once we have finished writing the redirector program, we need to configure Squid to use it properly. There are a few directives in the Squid configuration file using which we can control how Squid will use our URL redirector program. Let's have a quick look at these directives.

Specifying the URL redirector program

We can specify the absolute path to our URL redirector program using the url_rewrite_program directive. We can also specify any additional interpreter or command line arguments that the program expects. The following are a few examples:

url_rewrite_program /opt/squid/libexec/custom_rewriter url_rewrite_program /usr/bin/python /opt/squid/libexec/my_rewriter.py url_rewrite_program /usr/bin/python /opt/squid/libexec/another_rewriter.py ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required