Solved

Squid - Custom Error Pages

Posted on 2013-02-05
5
119 Views
Last Modified: 2016-03-13
Hi all,

Currently have multiple domains being served by a reverse proxy on squid - I need to add config on my current squid server to display different error pages depending on the domain requested.


:)
0
Comment
Question by:ddiazp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 78

Expert Comment

by:arnold
ID: 38859427
Usually custom errors are part on the systems to which the data/requests are passed.

If the reverse proxy secures a web server, the custom error configuration will be on the web server.
Could you provide an example of a request and the error message you would like to see on the client?
0
 
LVL 10

Author Comment

by:ddiazp
ID: 38859612
On my squid config i have the following line:

error_directory /usr/share/squid/errors/templates/error_templates

and under /usr/share/squid/errors/templates/error_templates I have an .html page that shows up when the end web server doesn't respond (timesout, etc.). and this shows for any request on any of the test1.com, test2.com, test3.com domains that I cache.


What i'd like is to have something on my main squid.conf file that will point to a specific 'error_directory' directive depending on what's accessed:

something like:

if user requests: www.test1.com then error_directory /path/to/test1/errorpage/
if user requests: www.test2.com then error_directory /path/to/test2/errorpage/
if user requests: www.test3.com then error_directory /path/to/test3/errorpage/

and so on.
0
 
LVL 78

Accepted Solution

by:
arnold earned 500 total points
ID: 38860301
Have a look at http://wiki.squid-cache.org/Features/CustomErrors depending on your installed squid version

Your local apache setup could be the backup to display the sorry we are temporarily unavailable.

I.e. primarily test1.com -> 10.0.0.2 when down return something site specific error.
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question