Solved

Squid - Custom Error Pages

Posted on 2013-02-05
5
105 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
  • 2
5 Comments
 
LVL 77

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 77

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

830 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