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

Alex Rousskov rousskov at measurement-factory.com
Thu May 18 16:35:35 UTC 2017

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.



More information about the squid-users mailing list