Re: [squid-users] redirecting to local page without http server

From: Chris Robertson <crobertson@dont-contact.us>
Date: Thu, 14 Jun 2007 11:07:53 -0800

Joao Miguel Ferreira wrote:
> Hi all,
>
> I'm using my own redirector with squid on the main gateway of our
> network.
>
> If a user tries to access certain sites I redirect him to a local page
> (very simple page with a 'FORBIDDEN' message) on the Apache default dir.
> It works fine.
>
> My question is: could I do this without any http server running on my
> gateway (not even on any of the internal LAN servers). Put it another
> way: can I tell squid to serve some kind of HTML message, defined within
> squid itself, when response_from_redirector != ""...
>
> or some other approach... this woulkd be very nice because, that way, I
> would not need to install any http server on my system.
>
> THX
>
> joao
>
>
>

Redirect "forbidden" requests to:

http://this.page.is.forbidden/

Then in squid.conf (fairly early):

acl forbidden dstdomain this.page.is.forbidden
http_access deny forbidden
deny_info ERR_FORBIDDEN_PAGE forbidden

Finally, create the {sysconfdir}/errors/English/ERR_FORBIDDEN_PAGE file
to suit.

Forbidden requests will be redirected to a non-existent domain, requests
for that non-existent domain will be denied, and a special deny page
will be shown.

Chris

Chris
Received on Thu Jun 14 2007 - 13:08:14 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Jul 01 2007 - 12:00:04 MDT