[squid-users] Conditional question

James Lay jlay at slave-tothe-box.net
Sat May 30 16:48:45 UTC 2015


Per the docs:

#  Conditional configuration
#
#       If-statements can be used to make configuration directives
#       depend on conditions:
#
#           if <CONDITION>
#               ... regular configuration directives ...
#           [else
#               ... regular configuration directives ...]
#           endif
#
#       The else part is optional. The keywords "if", "else", and
"endif"
#       must be typed on their own lines, as if they were regular
#       configuration directives.
#
#       NOTE: An else-if condition is not supported.
#
#       These individual conditions types are supported:
#
#           true
#               Always evaluates to true.
#           false
#               Always evaluates to false.
#           <integer> = <integer>
#               Equality comparison of two integer numbers.

Anyone have any examples, documentation, heck ANYTHING that can show how
this works?  I can't seem to find a thing besides the above.  My goal is
something like the below:

if port = 80
    http_access deny all
else
    http_access allow all
endif

But nothing I'm trying as the condition expression is working.  Thank
you.

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20150530/0f036b9a/attachment.html>


More information about the squid-users mailing list