Zentyal Forum, Linux Small Business Server
Zentyal Server => Installation and Upgrades => Topic started by: Escorpiom on November 24, 2011, 07:34:19 pm
-
Better to tackle this issue right now before someone else is looking all over...
Today one of my users complained about not being able to see the photos on some website. He said that somewhere else the photos were loading just fine.
After visiting this site:
http://www.amarillasinternet.com
and conducting a search like "restaurantes", no images were displayed on the right side of the screen.
Opening the foto gallery yielded the same result.
I knew instantly that it was the Adzapper playing up, but adding the sites address to the exception list (Dansguardian) didn't solve anything.
After poking around in my server I found the script here:
/usr/bin/adzapper
A little down the list there are a few lines starting with "PASS", those are the sites that will NOT be zapped so I just maintained the same format and added
amarillasinternet to the list.
After restarting the proxy all was well.
I don't know if this will "stick" after an update. In that case it could be helpful to know how we can create static exception lists.
You have to take care with the cache, sometimes you need to clear the browser cache to have all the stuff come up again.
Hope this eventually saves people from searching all over.
Cheers.
-
No, your modifications to /usr/bin/adzapper would get overwritten by a possible update.
Please read:
http://adzapper.sourceforge.net/#pattern-files
In /etc/adzapper.conf you can define custom patterns in files you define via ZAP_POSTMATCH=<file> (and ZAP_PREMATCH) -- this should do the trick.
-
I remember you that this file is overwritten when saving configuration changes, so use a post conf hook as usual.
-
Gotcha! 8)
I decided to use a custom template.
Will $postMatch => '' ever make it to Zentyal's web interface?
-
Got it, more or less :)
Found adzapper.conf where it should be. In that file exist the line "ZAP_POSTMATCH="
So I should give the path to the extra pattern file, seems best to put it in /usr/bin like the main script.
What about the file name? Would any name do?
Like:
ZAP_POSTMATCH=/usr/bin/postmatch
Assuming the file would have to be in the same format as the url's in the main script.
Is above correct?
Cheers.
-
Yes, any name would do.
But I'd suggest you better put these files to /etc or /usr/local/etc, like:
/usr/local/etc/adzapper_postmatch.conf
The fileformat is the one from the main script; e.g. I have the following in /usr/local/etc/adzapper_postmatch.conf:
ADJS http://im.banner.t-online.de/addyn/**
ADJS http://bs.serving-sys.com/**
ADJS http://ds.serving-sys.com/**
-
Perfect, no more questions about locations, filename or format.
But what about the PASS lines? If the main script first "zaps" the site I've put in postmatch to "unblock" it, it would perhaps get zapped anyway...
The adzapper documentation says that prematch is better left empty, but for the PASS statements it might be necessary to populate that file.
Cheers.
-
Since I personally don't have a need for PASS statements, I assume that things should work, if you put
- PASS statements to your custom prematch file and
- any additional blocking statements to your custom postmatch file