Quantcast

Custom Error Messages

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Custom Error Messages

Waldon, Cooper

Hi All,

 

I’m attempting to make a custom error message when a page is blocked.  I found the example here:

http://wiki.squid-cache.org/SquidFaq/SquidAcl#I_want_to_customize.2C_or_make_my_own_error_messages.

 

But it’s not working for me.

 

My configuration looks like this:

 

acl test url_regex “/etc/squid/blacklists/test/domains”

deny_info block test

http_access deny test

 

The page is being blocked but I get an error message that says Internal Error: Missing Template block

 

I’ve tried changing the second line to be an absolute path but it doesn’t work.  I’m not sure what the default directory for the error messages is.  I did find another thread that mentions it should be in the …/error/templates/ folder but when I create that folder (i.e. /etc/squid/error/templates/) it still doesn’t work.

 

I installed squid from rpm in RedHat 7 so I’m not sure if the default paths are changed?

 

Thanks,

 

Cooper Waldon Network Engineer l OTN l 416-446-4110 x 4473 l www.otn.ca | Service Desk 1-855-654-0888 x2

 


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Error Messages

Waldon, Cooper

Nevermind, I found the path.

 

For anyone else who need it it’s:

 

/usr/share/squid/

 

From: squid-users [mailto:[hidden email]] On Behalf Of Waldon, Cooper
Sent: Tuesday, March 28, 2017 12:51 PM
To: [hidden email]
Subject: [squid-users] Custom Error Messages

 

This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing

Feedback

Hi All,

 

I’m attempting to make a custom error message when a page is blocked.  I found the example here:

http://wiki.squid-cache.org/SquidFaq/SquidAcl#I_want_to_customize.2C_or_make_my_own_error_messages.

 

But it’s not working for me.

 

My configuration looks like this:

 

acl test url_regex “/etc/squid/blacklists/test/domains”

deny_info block test

http_access deny test

 

The page is being blocked but I get an error message that says Internal Error: Missing Template block

 

I’ve tried changing the second line to be an absolute path but it doesn’t work.  I’m not sure what the default directory for the error messages is.  I did find another thread that mentions it should be in the …/error/templates/ folder but when I create that folder (i.e. /etc/squid/error/templates/) it still doesn’t work.

 

I installed squid from rpm in RedHat 7 so I’m not sure if the default paths are changed?

 

Thanks,

 

Cooper Waldon Network Engineer l OTN l 416-446-4110 x 4473 l www.otn.ca | Service Desk 1-855-654-0888 x2

 


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Error Messages

Amos Jeffries
Administrator
On 29/03/2017 6:28 a.m., Waldon, Cooper wrote:
> Nevermind, I found the path.
>
> For anyone else who need it it's:
>
> /usr/share/squid/
>

Aye, that is OS dependant though so YMMV.

For the record; using an absolute-path for the deny_info filename should
have worked on systems where '/' is the path initial character. Some
older Squid had a bug but I expect 3.4+ to work with that.

Amos

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Loading...