Re: [squid-users] Rock store size not decreasing

2017-05-19 Thread Dan Charlesworth
Okay, cool — thanks for clarifying.

Guess I'll nuke it myself and reinitialise a blank one.

Best,
Dan


On 19 May 2017 at 23:29, Amos Jeffries  wrote:

> On 19/05/17 15:47, Dan Charlesworth wrote:
>
>> Hey all
>>
>> I'm fairly new to rock caching. With aufs, if you reduce the cache size
>> in the config it'll start slowly reducing it down the new size.
>>
>> I've done that with a ~137GB rock store (reduced it to 10240MB) but it
>> 'aint changing after reloading the config.
>>
>
> With UFS/AUFSdiskd the cache is stored in a directory tree with individual
> files per item. Reducing the size results in files being deleted from disk
> an the total size shrinks naturally without any special action by Squid.
>
> Rock on the other hand has all content stored inside one file. That file
> gets initialized with the space configured and maybe grown if needed. But
> there is nothing I'm aware of to reinitialize it on smaller sizes being
> configured. Reducing the size does reduce the size of stuff using space
> *inside* the database file, but AFAIK not the file itself.
>
> Amos
>
> ___
> squid-users mailing list
> squid-users@lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
>



-- 
Getbusi
p +61 3 6165 1555
e d...@getbusi.com
w getbusi.com
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Documentation for squidclient?

2017-05-19 Thread erdosain9
Hi again.

Just boot up
11:43
number active: 14 of 25 (0 shutting down)
requests sent: 166348
replies received: 166348
queue length: 0
avg service time: 34 msec

   ID #  FD PID  # Requests   # Replies  Flags Time  Offset
Request
366  97   13237 510 510   0.040   0 
(none)
367 107   13238 225 225   0.243   0 
(none)
368 135   13239 119 119   0.069   0 
(none)
369  94   13240  77  77   0.072   0 
(none)
370 109   13242  51  51   0.228   0 
(none)
371 131   13243  41  41   0.228   0 
(none)
372 301   13244  28  28   0.276   0 
(none)
373 212   13245  23  23   0.276   0 
(none)
374 261   13246  15  15   0.276   0 
(none)
375 427   13249   9   9   0.276   0 
(none)
376 429   13250   6   6   0.276   0 
(none)
377 431   13251   5   5   0.276   0 
(none)
381 332   13293   2   2   0.276   0 
(none)
382 496   13359   1   1   0.276   0 
(none)


12:00
-
number active: 25 of 25 (0 shutting down)
requests sent: 173579
replies received: 173579
queue length: 0
avg service time: 42 msec

   ID #  FD PID  # Requests   # Replies  Flags Time  Offset
Request
366  97   1323735613561   0.130   0 
(none)
367 107   1323816221622   0.059   0 
(none)
368 135   13239 910 910   0.128   0 
(none)
369  94   13240 599 599   0.142   0 
(none)
370 109   13242 411 411   0.153   0 
(none)
371 131   13243 308 308   0.215   0 
(none)
372 301   13244 230 230   0.167   0 
(none)
373 212   13245 172 172   0.136   0 
(none)
374 261   13246 120 120   0.167   0 
(none)
375 427   13249  98  98   0.173   0 
(none)
376 429   13250  71  71   0.120   0 
(none)
377 431   13251  50  50   0.180   0 
(none)
381 332   13293  41  41   0.294   0 
(none)
382 496   13359  32  32   0.312   0 
(none)
383 374   13361  25  25   0.192   0 
(none)
384 377   13362  21  21   0.309   0 
(none)
385 373   13430  16  16   0.198   0 
(none)
386 392   13431  13  13   1.044   0 
(none)
387 399   13432  10  10   0.960   0 
(none)
388 403   13433   8   8   1.006   0 
(none)
389 448   13434   6   6   0.930   0 
(none)
390 450   13435   7   7   0.994   0 
(none)
391 452   13436   5   5   0.927   0 
(none)
392 455   13437   4   4   0.829   0 
(none)
393 457   13438   3   3   0.253   0 
(none)


12:30

number active: 25 of 25 (0 shutting down)
requests sent: 182608
replies received: 182608
queue length: 0
avg service time: 36 msec

   ID #  FD PID  # Requests   # Replies  Flags Time  Offset
Request
366  97   1323774587458   0.085   0 
(none)
367 107   1323834013401   0.128   0 
(none)
368 135   1323918621862   0.108   0 
(none)
369  94   1324012351235   0.534   0 
(none)
370 109   13242 862 862   0.115   0 
(none)
371 131   13243 641 641   0.118   0 
(none)
372 301   13244 466 466   0.118   0 
(none)
373 212   13245 335 335   

Re: [squid-users] Change are not taking

2017-05-19 Thread Dijxie

W dniu 19.05.2017 o 19:13, Patrick Flaherty pisze:


Hi,

I am making changes to my squid.conf, yet they don’t seem to take. Is 
there something I’m missing? Any help appreciated


# Squid Proxy Configuration

# Network(s) where proxy traffic is originating

# acl localnet src 10.0.0.0/8  # RFC1918 possible internal network

# acl localnet src 172.16.0.0/12   # RFC1918 possible internal network

# acl localnet src 192.168.0.0/16 # RFC1918 possible internal network

acl localnet src all

# acl and http_access ("rmsc.txt")

acl whitelist dstdomain "c:/squid/etc/squid/rmsc.txt"

http_accessallow whitelist

acl http  proto  http

acl https proto  https

acl SSL_ports port 443

acl Safe_ports port 80# http

acl Safe_ports port 443  # https

acl CONNECT method CONNECT

# rules allowing proxy access

http_access allow http  Safe_ports whitelist localnet

http_access allow https SSL_ports whitelist localnet

# Deny requests to certain unsafe ports

http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports

http_access deny CONNECT !SSL_ports

# Lastly deny all other access to this proxy

http_access deny all

# Listens to port 3128

http_port 3128

# DNS servers (Change dns_nameservers to client dns servers for 
consistency and better performance)


dns_nameservers 8.8.8.8 8.8.4.4

# Roll log file daily and keep 30 days

logfile_rotate 30

# Access log format

logformat squid %tl %6tr %>a %Ss/%03>Hs %http://lists.squid-cache.org/listinfo/squid-users


But what changes are you making?
Are you aware that you must reapply squid.conf after changing it by 
restarting or reloading? At linux, it's squid -k reconfigure; dunno how 
to do that on Windows, the same way i guess...


--
Greets, Dijx

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


[squid-users] Change are not taking

2017-05-19 Thread Patrick Flaherty
Hi,

 

I am making changes to my squid.conf, yet they don't seem to take. Is there
something I'm missing? Any help appreciated

 

# Squid Proxy Configuration

 

# Network(s) where proxy traffic is originating

# acl localnet src 10.0.0.0/8  # RFC1918 possible internal network

# acl localnet src 172.16.0.0/12   # RFC1918 possible internal network

# acl localnet src 192.168.0.0/16 # RFC1918 possible internal network

acl localnet src all

 

# acl and http_access ("rmsc.txt")

acl whitelist dstdomain  "c:/squid/etc/squid/rmsc.txt"

http_accessallow whitelist

 

acl http  proto  http

acl https proto  https

acl SSL_ports port 443

acl Safe_ports port 80# http

acl Safe_ports port 443  # https

acl CONNECT method CONNECT

 

# rules allowing proxy access

http_access allow http  Safe_ports whitelist localnet

http_access allow https SSL_ports whitelist localnet

 

# Deny requests to certain unsafe ports

http_access deny !Safe_ports

 

# Deny CONNECT to other than secure SSL ports

http_access deny CONNECT !SSL_ports

 

# Lastly deny all other access to this proxy

http_access deny all

 

# Listens to port 3128

http_port 3128

 

# DNS servers (Change dns_nameservers to client dns servers for consistency
and better performance)

dns_nameservers 8.8.8.8 8.8.4.4

 

# Roll log file daily and keep 30 days

logfile_rotate 30

 

# Access log format

logformat squid %tl %6tr %>a %Ss/%03>Hs %___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] How to redirect all squid's error pages to one?

2017-05-19 Thread Dijxie

W dniu 19.05.2017 o 17:16, Amos Jeffries pisze:

On 20/05/17 02:55, Dijxie wrote:

W dniu 19.05.2017 o 15:13, Amos Jeffries pisze:

On 20/05/17 00:44, Dijxie wrote:


Hi list,

1. I'd like to redirect **all** squid error pages to one, 
universal, preferably internal squid error page. For sure I can 
symlink every error page to one, but is there a clener way?
I'm not sure if I get it: 
http://www.squid-cache.org/Doc/config/deny_info/




deny_info is to provide some non-default response payload (aka. 
"page") instead of the 403 when an ACL performs administrative 
denial of access.


As to your purpose; What is this universal message that conveys all 
possible environmental conditions to the reader in one simple text?


Keep in mind that the reader may not be human; some errors are 
explanations of indirect problems and only visible when the 
accompanying machine instructions reach a failure (eg 30x, 401, 407 
messages); and some are not errors at all but instructions for a 
user on what they need to do to continue with communication (eg 511 
login pages).


2. And then, using %e code and presumably external js nested in 
this page, display more detailed info for some error numbers.


Can it be done? Can squid internal web server handle easy js?



Squid is not a web server. On "error" it produces message payloads 
which happen to contain HTML by default. Modern HTML can contain 
embedded scripts, but they are not interpreted by Squid as anything 
beyond opaque characters.



If you redirect all errors to one URL any information the client 
might have had about the error is destroyed.


The symlinking you though of is the "best" way to do what you are 
asking for. However, think carefully about what the purpose of 
displaying an error message is, see above.


Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


The purpose is to provide unified, debug info for 1st line of 
support. End users in my corpo are not best IT trained people in the 
world and they tend to open tickets for any reason, usually pasting 
printscreen into ticket.
Simple debug info like: IP, user name, client name, cache name in 
short list would help service desk to divide "moronic" tickets from 
important ones, and as for default squid info pages... user do not 
read them anyway. I do not want to remove error codes, I just want to 
remove content of most error pages and replace it with unified 
message that also contains raw error code (%e, %E) and add some more 
information if %e will be nxdomain or access denied for example.
Unfortunately, I'm far from VPN right now, so I cannot show you the 
sample "unified" error page I've commited till now.


But indeed, you have striked the home; cache users are both human and 
machine$ AD accounts, I must reconsider that. Perhaps parsing all 
error pages with sed ie and adding few lines will be easer and more 
convenient, anyway.
I know that squid is not web serwer, but error page is html; I assume 
it can contains iframe served from external web server and this will 
be rendered by client's browser, not squid? My idea was:

- js nested in squid error page looks for error code
- then redirects nested iframe to specific URL hosted on external 
httpd depending on error code. If error code is unimportant for human 
(user can do nothing with that anyway), iframe stays blank.
- human client has has his explenation like "this is your error, do 
not open ticket please, check your URL again" for nxdomain.


We are talking about ~2K users and 3-4 cache servers. I must take 
comfort of first line support into concideration, they are quite 
heavy-loaded already.
I'm not feeling comfortable with this idea, but I also have a feeling 
that it might be necessity.




I think a better approach may be a link they can click on that 
automatically reports the details for them. Some of our errors already 
include a mailto web link to contact the administrator that embeds the 
error details in subject etc as an example. But you can go a bit 
further with a jQuery script that pulls IP etc and POSTs them to a 
support database API.


You can also reduce a bit of the work editing files by pointing 
error_directory in squid.conf to a directory with your altered 
templates. That will save your changes from being overwritten when the 
OS packaged ones update.


Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


It would be yet another explanatory link they don't ever click, 
unfortunately. But yes, I know it would be a better approach. This is an 
organizational and 'political' issue and me myself can do nothing about it.
malto: is alredy removed - they cannot open tickets this way and we do 
not want to be flooded by emails like that.


That was my pimal idea: simle database/array that contains 

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

2017-05-19 Thread Alex Rousskov
On 05/19/2017 02:10 AM, Dieter Bloms wrote:
> But there was _no_ error message in the cache log file.

You are right. The lack of an error message is a Squid bug.


On 05/19/2017 07:40 AM, Amos Jeffries wrote:

> I just checked the code and do see a log entry being made

The code you are looking at is not executed. Look two lines higher at
the if statement that guards it... Code duplication strikes again.

Alex.

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] How to redirect all squid's error pages to one?

2017-05-19 Thread Amos Jeffries

On 20/05/17 02:55, Dijxie wrote:

W dniu 19.05.2017 o 15:13, Amos Jeffries pisze:

On 20/05/17 00:44, Dijxie wrote:


Hi list,

1. I'd like to redirect **all** squid error pages to one, universal, 
preferably internal squid error page. For sure I can symlink every 
error page to one, but is there a clener way?
I'm not sure if I get it: 
http://www.squid-cache.org/Doc/config/deny_info/




deny_info is to provide some non-default response payload (aka. 
"page") instead of the 403 when an ACL performs administrative denial 
of access.


As to your purpose; What is this universal message that conveys all 
possible environmental conditions to the reader in one simple text?


Keep in mind that the reader may not be human; some errors are 
explanations of indirect problems and only visible when the 
accompanying machine instructions reach a failure (eg 30x, 401, 407 
messages); and some are not errors at all but instructions for a user 
on what they need to do to continue with communication (eg 511 login 
pages).


2. And then, using %e code and presumably external js nested in this 
page, display more detailed info for some error numbers.


Can it be done? Can squid internal web server handle easy js?



Squid is not a web server. On "error" it produces message payloads 
which happen to contain HTML by default. Modern HTML can contain 
embedded scripts, but they are not interpreted by Squid as anything 
beyond opaque characters.



If you redirect all errors to one URL any information the client 
might have had about the error is destroyed.


The symlinking you though of is the "best" way to do what you are 
asking for. However, think carefully about what the purpose of 
displaying an error message is, see above.


Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


The purpose is to provide unified, debug info for 1st line of support. 
End users in my corpo are not best IT trained people in the world and 
they tend to open tickets for any reason, usually pasting printscreen 
into ticket.
Simple debug info like: IP, user name, client name, cache name in 
short list would help service desk to divide "moronic" tickets from 
important ones, and as for default squid info pages... user do not 
read them anyway. I do not want to remove error codes, I just want to 
remove content of most error pages and replace it with unified message 
that also contains raw error code (%e, %E) and add some more 
information if %e will be nxdomain or access denied for example.
Unfortunately, I'm far from VPN right now, so I cannot show you the 
sample "unified" error page I've commited till now.


But indeed, you have striked the home; cache users are both human and 
machine$ AD accounts, I must reconsider that. Perhaps parsing all 
error pages with sed ie and adding few lines will be easer and more 
convenient, anyway.
I know that squid is not web serwer, but error page is html; I assume 
it can contains iframe served from external web server and this will 
be rendered by client's browser, not squid? My idea was:

- js nested in squid error page looks for error code
- then redirects nested iframe to specific URL hosted on external 
httpd depending on error code. If error code is unimportant for human 
(user can do nothing with that anyway), iframe stays blank.
- human client has has his explenation like "this is your error, do 
not open ticket please, check your URL again" for nxdomain.


We are talking about ~2K users and 3-4 cache servers. I must take 
comfort of first line support into concideration, they are quite 
heavy-loaded already.
I'm not feeling comfortable with this idea, but I also have a feeling 
that it might be necessity.




I think a better approach may be a link they can click on that 
automatically reports the details for them. Some of our errors already 
include a mailto web link to contact the administrator that embeds the 
error details in subject etc as an example. But you can go a bit further 
with a jQuery script that pulls IP etc and POSTs them to a support 
database API.


You can also reduce a bit of the work editing files by pointing 
error_directory in squid.conf to a directory with your altered 
templates. That will save your changes from being overwritten when the 
OS packaged ones update.


Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] How to redirect all squid's error pages to one?

2017-05-19 Thread Dijxie

W dniu 19.05.2017 o 15:13, Amos Jeffries pisze:

On 20/05/17 00:44, Dijxie wrote:


Hi list,

1. I'd like to redirect **all** squid error pages to one, universal, 
preferably internal squid error page. For sure I can symlink every 
error page to one, but is there a clener way?
I'm not sure if I get it: 
http://www.squid-cache.org/Doc/config/deny_info/




deny_info is to provide some non-default response payload (aka. 
"page") instead of the 403 when an ACL performs administrative denial 
of access.


As to your purpose; What is this universal message that conveys all 
possible environmental conditions to the reader in one simple text?


Keep in mind that the reader may not be human; some errors are 
explanations of indirect problems and only visible when the 
accompanying machine instructions reach a failure (eg 30x, 401, 407 
messages); and some are not errors at all but instructions for a user 
on what they need to do to continue with communication (eg 511 login 
pages).


2. And then, using %e code and presumably external js nested in this 
page, display more detailed info for some error numbers.


Can it be done? Can squid internal web server handle easy js?



Squid is not a web server. On "error" it produces message payloads 
which happen to contain HTML by default. Modern HTML can contain 
embedded scripts, but they are not interpreted by Squid as anything 
beyond opaque characters.



If you redirect all errors to one URL any information the client might 
have had about the error is destroyed.


The symlinking you though of is the "best" way to do what you are 
asking for. However, think carefully about what the purpose of 
displaying an error message is, see above.


Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


The purpose is to provide unified, debug info for 1st line of support. 
End users in my corpo are not best IT trained people in the world and 
they tend to open tickets for any reason, usually pasting printscreen 
into ticket.
Simple debug info like: IP, user name, client name, cache name in short 
list would help service desk to divide "moronic" tickets from important 
ones, and as for default squid info pages... user do not read them 
anyway. I do not want to remove error codes, I just want to remove 
content of most error pages and replace it with unified message that 
also contains raw error code (%e, %E) and add some more information if 
%e will be nxdomain or access denied for example.
Unfortunately, I'm far from VPN right now, so I cannot show you the 
sample "unified" error page I've commited till now.


But indeed, you have striked the home; cache users are both human and 
machine$ AD accounts, I must reconsider that. Perhaps parsing all error 
pages with sed ie and adding few lines will be easer and more 
convenient, anyway.
I know that squid is not web serwer, but error page is html; I assume it 
can contains iframe served from external web server and this will be 
rendered by client's browser, not squid? My idea was:

- js nested in squid error page looks for error code
- then redirects nested iframe to specific URL hosted on external httpd 
depending on error code. If error code is unimportant for human (user 
can do nothing with that anyway), iframe stays blank.
- human client has has his explenation like "this is your error, do not 
open ticket please, check your URL again" for nxdomain.


We are talking about ~2K users and 3-4 cache servers. I must take 
comfort of first line support into concideration, they are quite 
heavy-loaded already.
I'm not feeling comfortable with this idea, but I also have a feeling 
that it might be necessity.


Thank You.

--
Greets, Dijx.

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


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

2017-05-19 Thread Amos Jeffries

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:


%l


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  and  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).


It may be that you missed it amongst the other informational startup 
messages, or that it is in the part of "cache.log" messages that are 
output before cache.log is opened - those lines currently go to stderr 
and/or your system messages log (where/what that is depends on your OS).


Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Rock store size not decreasing

2017-05-19 Thread Amos Jeffries

On 19/05/17 15:47, Dan Charlesworth wrote:

Hey all

I'm fairly new to rock caching. With aufs, if you reduce the cache 
size in the config it'll start slowly reducing it down the new size.


I've done that with a ~137GB rock store (reduced it to 10240MB) but it 
'aint changing after reloading the config.


With UFS/AUFSdiskd the cache is stored in a directory tree with 
individual files per item. Reducing the size results in files being 
deleted from disk an the total size shrinks naturally without any 
special action by Squid.


Rock on the other hand has all content stored inside one file. That file 
gets initialized with the space configured and maybe grown if needed. 
But there is nothing I'm aware of to reinitialize it on smaller sizes 
being configured. Reducing the size does reduce the size of stuff using 
space *inside* the database file, but AFAIK not the file itself.


Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] How to redirect all squid's error pages to one?

2017-05-19 Thread Amos Jeffries

On 20/05/17 00:44, Dijxie wrote:


Hi list,

1. I'd like to redirect **all** squid error pages to one, universal, 
preferably internal squid error page. For sure I can symlink every 
error page to one, but is there a clener way?

I'm not sure if I get it: http://www.squid-cache.org/Doc/config/deny_info/



deny_info is to provide some non-default response payload (aka. "page") 
instead of the 403 when an ACL performs administrative denial of access.


As to your purpose; What is this universal message that conveys all 
possible environmental conditions to the reader in one simple text?


Keep in mind that the reader may not be human; some errors are 
explanations of indirect problems and only visible when the accompanying 
machine instructions reach a failure (eg 30x, 401, 407 messages); and 
some are not errors at all but instructions for a user on what they need 
to do to continue with communication (eg 511 login pages).


2. And then, using %e code and presumably external js nested in this 
page, display more detailed info for some error numbers.


Can it be done? Can squid internal web server handle easy js?



Squid is not a web server. On "error" it produces message payloads which 
happen to contain HTML by default. Modern HTML can contain embedded 
scripts, but they are not interpreted by Squid as anything beyond opaque 
characters.



If you redirect all errors to one URL any information the client might 
have had about the error is destroyed.


The symlinking you though of is the "best" way to do what you are asking 
for. However, think carefully about what the purpose of displaying an 
error message is, see above.


Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] How to redirect all squid's error pages to one?

2017-05-19 Thread Matus UHLAR - fantomas

On 19.05.17 14:44, Dijxie wrote:
1. I'd like to redirect **all** squid error pages to one, universal, 
preferably internal squid error page. For sure I can symlink every 
error page to one, but is there a clener way?

I'm not sure if I get it: http://www.squid-cache.org/Doc/config/deny_info/

2. And then, using %e code and presumably external js nested in this 
page, display more detailed info for some error numbers.


Can it be done? Can squid internal web server handle easy js?


no, unless using icap/ecap. 


But what's the point to direct all error messages (with language
autodection) into one, when you also want to make them different by
javascript?
--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
It's now safe to throw off your computer.
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


[squid-users] How to redirect all squid's error pages to one?

2017-05-19 Thread Dijxie

Hi list,

1. I'd like to redirect **all** squid error pages to one, universal, 
preferably internal squid error page. For sure I can symlink every error 
page to one, but is there a clener way?

I'm not sure if I get it: http://www.squid-cache.org/Doc/config/deny_info/

2. And then, using %e code and presumably external js nested in this 
page, display more detailed info for some error numbers.


Can it be done? Can squid internal web server handle easy js?

--
Greets, Dijx

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


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

2017-05-19 Thread Benjamin E. Nichols
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 
instead...


/usr/share/squid-langpack/templates/ERR_ACCESS_DENIED

And make sure your css is within your style tag.

.someclass{background:#000;}

And make sure you place this css inside the tag 


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:


%l


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  and  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.




--
--

Signed,

Benjamin E. Nichols
http://www.squidblacklist.org

1-405-397-1360 - Call Anytime.

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


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

2017-05-19 Thread Dieter Bloms
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:
> > 
> > 
> > %l
> > 
> > 
> > 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  and  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.


-- 
Regards

  Dieter

--
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.
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users