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

Time for action – testing our configuration file

As we learned before, we can use the -k parse option to test our configuration file. Now, we are going to add a test line and see if Squid can catch the error.

  1. For example, let's add the following line to our squid.conf file:
    unknown_directive 1234
  2. Now we'll run Squid with the -k parse option as follows:
    squid -k parse
    
  3. As unknown_directive is not a valid directive for the Squid configuration file, we should get an error similar to the following:
    2010/07/21 22:28:40| cache_cf.cc(346) squid.conf:945 unrecognized: 'unknown_directive'
    

So, if we find an error within our configuration file, we can go back and fix the errors and then parse the configuration file again.

What just happened?

We first added an ...

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