Search squid archive

Re: Reverse Proxy custom 404/500 pages for each site?

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

 



Okay, so what is the '%H' for?

I want to host these error pages off the squid server its self.

At the moment I have it working for every 404/500 error, regardless of
the site trying to be accessed.

-- 
  Paul
  sima_yi@xxxxxxxxxxxxx

On Thu, May 16, 2013, at 09:11 AM, Martin Sperl wrote:
> I had a similar issue just recently...
> 
> The only option I found is  that you can use deny_info and send a
> redirect to a "different" URL for those error cases you are interested
> in.
> 
> Like this: deny_info http://<hostname>/%H/error-icap.html   ERROR_ICAP
> 
> Then you have to have an Apache or similar listening on the <hostname> of
> your choice to deliver the "error page" you are interested in...
> 
> Ciao,
> 	Martin
> 
> -----Original Message-----
> From: PSA4444 [mailto:sima_yi@xxxxxxxxxxxxx] 
> Sent: Donnerstag, 16. Mai 2013 08:40
> To: squid-users@xxxxxxxxxxxxxxx
> Subject:  Reverse Proxy custom 404/500 pages for each site?
> 
> I have setup Squid as a reverse proxy with more than 10 websites behind
> it. 
> 
> I am using custom 404 and 500 error pages which are shown, regardless of
> which site is being accessed. 
> 
> Is there a way I can target each site with a specific 404 page? 
> 
> So in the example config below, I would like 'siteone' to have 'this link
> on
> siteone is down' and site two to have 'this pages does not exist on
> sitetwo', etc. 
> 
> --- 
> Config: 
> 
> #Top of the config file 
> acl denied_status_404 http_status 404 
> acl denied_status_500 http_status 500 
> 
> 
> #(Pages are defined here, such as): 
> #SITEONE API 
> cache_peer api.siteone.com parent 443 0 no-query originserver ssl
> sslversion=3 sslflags=DONT_VERIFY_PEER front-end-https=on name=api
> login=PASSTHRU 
> acl sites_api dstdomain api.siteone.com 
> cache_peer_access api allow sites_api serviceHours1 
> cache_peer_access api allow sites_api serviceHours2 
> cache_peer_access api deny sites_jarc publicall 
> acl http proto http 
> acl https proto https 
> 
> #SITETWO 
> #PRODUCTION W3 
> cache_peer www.sitetwo.com parent 80 0 no-query originserver name=www 
> acl sites_www dstdomain www.sitetwo.com sitetwo.com 
> cache_peer_access www allow sites_www 
> acl http proto http 
> acl https proto https 
> 
> 
> #Bottom of the config file: 
> deny_info siteone.404.html denied_status_404 
> http_reply_access deny denied_status_404 
> deny_info siteone.500.html denied_status_500 
> http_reply_access deny denied_status_500 
> 
> --- 
> Squid Cache: Version 3.2.1
> 
> 
> 
> --
> View this message in context:
> http://squid-web-proxy-cache.1019090.n4.nabble.com/Reverse-Proxy-custom-404-500-pages-for-each-site-tp4660050.html
> Sent from the Squid - Users mailing list archive at Nabble.com.
> 
> This message and the information contained herein is proprietary and
> confidential and subject to the Amdocs policy statement,
> you may review at http://www.amdocs.com/email_disclaimer.asp

-- 
http://www.fastmail.fm - Does exactly what it says on the tin





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

  Powered by Linux