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

Benjamin E. Nichols webmaster at squidblacklist.org
Fri May 19 09:03:17 UTC 2017

You might actually be in the wrong directory, I wouldnt be surprised if 
this was the case, particularly if you are using a debian or ubuntu box.

Heres a hint.  You need to be editing the following default document 


And make sure your css is within your style tag.


And make sure you place this css inside the tag <head></head>

On 5/19/2017 3:10 AM, 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.



Benjamin E. Nichols

1-405-397-1360 - Call Anytime.

More information about the squid-users mailing list