Link to home
Start Free TrialLog in
Avatar of ddiazp
ddiazpFlag for Canada

asked on

Squid - Custom Error Pages

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.


:)
Avatar of arnold
arnold
Flag of United States of America image

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?
Avatar of ddiazp

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial