Solved

Squid - Custom Error Pages

Posted on 2013-02-05
5
90 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 76

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
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 76

Accepted Solution

by:
arnold earned 500 total points
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
nmap scanner? 7 77
Problem to go to Web page 2 48
Best way to split and output to csv in bash 2 26
cookies analysis tools 2 26
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Let’s list some of the technologies that enable smooth teleworking. 
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now