[squid-users] Portal Splash Pages example on squid 3.3.13

Amos Jeffries squid3 at treenet.co.nz
Wed Feb 11 23:45:20 UTC 2015


On 10/02/2015 7:45 p.m., amitinfo2k wrote:
> thanks for the quick reply.I made the changes accordingly as follows
> :---------------------------------------------------------------------------------------------....#
> Set up the session helper in active mode. Mind the wrap - this is one
> line:external_acl_type session ipv4 concurrency=100 ttl=3 %SRC
> /usr/lib64/squid/ext_session_acl -a -T 60 -b /var/lib/squid/session/# Pass
> the LOGIN command to the session helper with this ACLacl session_login
> external session LOGIN# Normal session ACL as per simple exampleacl
> session_is_active external session# ACL to match URLacl clicked_login_url
> url_regex -i ^http://example.net/$# First check for the login URL. If
> present, login sessionhttp_access allow clicked_login_url session_login# If
> we get here, URL not present, so renew session or deny request.http_access
> deny !session_is_active# Deny page to displaydeny_info
> 511:http://example.net/
> session_is_active---------------------------------------------------------------------------------------------but,
> after the squid restart it fails with following error
> :---------------------------------------------------------------------------------------------Feb
> 09 22:40:31 localhost.localdomain systemd[1]: Starting Squid caching
> proxy...Feb 09 22:40:31 localhost.localdomain squid[4561]: 2015/02/09
> 22:40:31| *FATAL: status 511 requires a template on
> '511:http://example.net/'*Feb 09 22:40:31 localhost.localdomain
> squid[4561]:*FATAL: Bungled /etc/squid/squid.conf line 114: deny_info
> 511:http://example.net/ session_is_active*Feb 09 22:40:31
> localhost.localdomain systemd[1]: squid.service: control process exited,
> code=exited status=1Feb 09 22:40:31 localhost.localdomain systemd[1]: Failed
> to start Squid caching
> proxy.---------------------------------------------------------------------------------------------
> 

Ar, sorry I keep forgetting. 511 is a response that has a body not a
redirect. You need to write your denial info in a static template file
for Squid to deliver. Any dynamics that need to be done can be written
in that with scripting.

Amos



More information about the squid-users mailing list