Search squid archive

RE: [squid-users] Adding a failure URL to Squid.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Chris Greyling [mailto:chris@xxxxxxxxx]
> Sent: Tuesday, June 14, 2005 6:40 AM
> To: squid-users@xxxxxxxxxxxxxxx
> Subject: [squid-users] Adding a failure URL to Squid.
> 
> 
> Hi,
> 
> I'm new to Squid, so I'm sorry for bugging you with this, but I keep
getting
> an error. I'm trying to add a failure URL to my Squid server, so that when
a
> banned website is accessed it will redirect the client to the specified
URL.
> How can I do this? I previously tried to do it via WebMin, but some
> permissions got changed, and my Squid server "died" I want to manually put
> it in the Squid config file.
> 
> I'm running
> FreeBSD 4.11
> Squid 2.5.10_1
> 
> Thx
> Chris aka N00B
> :-p

>From http://www.squid-cache.org/Doc/FAQ/FAQ-10.html#ss10.24:

:  10.24 I want to customize, or make my own error messages.
:
:  You can customize the existing error messages as described in
Customizable 
:  Error Messages. You can also create new error messages and use these in 
:  conjunction with the deny_info option.
:
:  For example, lets say you want your users to see a special message when
they 
:  request something that matches your pornography list. First, create a
file 
:  named ERR_NO_PORNO in the /usr/local/squid/etc/errors directory. That
file might 
:  contain something like this:
:
:  <p>
:  Our company policy is to deny requests to known porno sites.  If you feel

:  you've received this message in error, please contact the support staff
:  (support@xxxxxxxxxxxxxxxx, 555-1234).
:
:  Next, set up your access controls as follows:
:
:  acl porn url_regex "/usr/local/squid/etc/porno.txt"
:  deny_info ERR_NO_PORNO porn
:  http_access deny porn
:  (additional http_access lines ...)

Though in your case, you would want the deny_info line to be:

deny_info http://your.webserver/path/to/no-porn.html porn

And (obviously) you would need to create the no-porn.html page versus the
ERR_NO_PORN page.

Chris

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux