LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Squid ReverseProxy: custom error pages with cache_peer_access rather than http_access (https://www.linuxquestions.org/questions/linux-software-2/squid-reverseproxy-custom-error-pages-with-cache_peer_access-rather-than-http_access-4175438058/)

4Paul4 11-20-2012 09:49 PM

Squid ReverseProxy: custom error pages with cache_peer_access rather than http_access
 
I am trying to setup some custom error pages on a squid reverse proxy server.

I know how to do this using http_access deny rules:
example:
Code:

http_access allow publicall
deny_info http://xxx.cloudfront.net/offline.html publicall

But I am using cache_peer_access to block access to certain websites. This is working well but the blocked users get ERR_CANNOT_FORWARD.

Code:

cache_peer_access tests allow sites_tests sydney
cache_peer_access tests deny sites_tests wisp

Is there a way to give them a custom error page? Is there an equivalent to deny_info for cache_peer_access?

Cheers

Squid info:
Code:

Squid Cache: Version 3.2.1
configure options:  '--build=x86_64-linux-gnu' '--prefix=/usr' '--enable-ssl' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=${prefix}/lib/squid3' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--srcdir=.' '--datadir=/usr/share/squid3' '--sysconfdir=/etc/squid3' '--mandir=/usr/share/man' '--with-cppunit-basedir=/usr' '--enable-inline' '--enable-async-io=8' '--enable-storeio=ufs,aufs,diskd' '--enable-removal-policies=lru,heap' '--enable-delay-pools' '--enable-cache-digests' '--enable-underscores' '--enable-icap-client' '--enable-arp-acl' '--with-filedescriptors=65536' '--with-large-files' '--with-default-user=proxy' '--enable-epoll' '--enable-linux-netfilter' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -g -Wall -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS=' 'CXXFLAGS=-g -O2 -g -Wall -O2' 'FFLAGS=-g -O2' '-with-openssl=/usr/include/openssl/' '--enable-http-violations'

OS Info:
Code:

Linux ip-10-0-0-36 3.2.0-25-virtual #40-Ubuntu SMP Wed May 23 22:20:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux


All times are GMT -5. The time now is 10:33 AM.