[squid-users] custom error pages with stylesheets doesn't work for me

Dieter Bloms squid at bloms.de
Fri May 19 13:56:38 UTC 2017

Hello Amos,

On Sat, May 20, Amos Jeffries wrote:

> On 19/05/17 20:10, Dieter Bloms wrote:
> >Hello Alex,
> >
> >On Thu, May 18, Alex Rousskov wrote:
> >
> >>On 05/18/2017 03:17 AM, Dieter Bloms wrote:
> >>
> >>>I wrote some custom error pages and activated style sheets in the header of the error pages like:
> >>>
> >>><style type="text/css">
> >>>%l
> >>></style>
> >>>
> >>>In the squid.conf file I set err_page_stylesheet to my stylesheet file and I restarted squid.
> >>>My expectation was, that the content of this style sheet file will be included in the error page at the %l position.
> >>Your expectation was correct.
> >>
> >>
> >>>But the place between <style type="text/css"> and </style> is empty.
> >>>Does anybody know how can I insert the content of the style sheet file to the error pages?
> >>The steps you described above appear correct to me. Did you check for
> >>errors in cache.log when starting Squid? Squid should complain if it
> >>cannot load err_page_stylesheet but, unfortunately, Squid thinks that
> >>you do not really care much about style and keeps running despite any
> >>loading failures.
> >>
> >>Temporary renaming the stylesheet file (so that Squid cannot load it)
> >>will help you test whether you are looking for errors in the right place.
> >thank you for the hint.
> >Squid had no read permission to this file. After right permissions
> >it worked.
> >But there was _no_ error message in the cache log file.
> >I found the wrong permission with the help of strace command.
> >It would be nice, when squid drop a note, that it can't read the file.
> I just checked the code and do see a log entry being made at critical level.
> It does not say "ERROR" like most of those things should though, just the
> filename and the system error message (fixed that right now).

thank you very much, so I will see the message next time ;)



I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
From field.

More information about the squid-users mailing list