d500448801 2009-10-05 c.kworr@d4daf: Here is a sample squid configuration:
d500448801 2009-10-05 c.kworr@d4daf:
d500448801 2009-10-05 c.kworr@d4daf: url_rewrite_program /path/to/squid-tagger/squid-tagger.py
d500448801 2009-10-05 c.kworr@d4daf: url_rewrite_children 1
d500448801 2009-10-05 c.kworr@d4daf: url_rewrite_concurrency 1024
d500448801 2009-10-05 c.kworr@d4daf:
d500448801 2009-10-05 c.kworr@d4daf: You need to create database with specific user for squid-tagger like this:
d500448801 2009-10-05 c.kworr@d4daf:
d500448801 2009-10-05 c.kworr@d4daf: CREATE ROLE squidtag WITH login password 'password';
d500448801 2009-10-05 c.kworr@d4daf: CREATE DATABASE squidtag WITH OWNER squidtag;
d500448801 2009-10-05 c.kworr@d4daf:
d500448801 2009-10-05 c.kworr@d4daf: After that database should be populated with:
d500448801 2009-10-05 c.kworr@d4daf:
d500448801 2009-10-05 c.kworr@d4daf: psql -f /path/to/squid-tagger/database.sql -U squidtag squidtag
d500448801 2009-10-05 c.kworr@d4daf:
d500448801 2009-10-05 c.kworr@d4daf: You also should create config file needed by squid-tagger to access database,
d500448801 2009-10-05 c.kworr@d4daf: by default squid-tagger searches this file in /usr/local/etc/ on behalf of
d500448801 2009-10-05 c.kworr@d4daf: bsd-style config file locations. But this can be overridden with -c command
d500448801 2009-10-05 c.kworr@d4daf: line switch.
d500448801 2009-10-05 c.kworr@d4daf:
d500448801 2009-10-05 c.kworr@d4daf: Sample configuration file is also included. Note that you should set file
d500448801 2009-10-05 c.kworr@d4daf: ownership to squid and rewoke any reading privileges from group and others.
d500448801 2009-10-05 c.kworr@d4daf:
d500448801 2009-10-05 c.kworr@d4daf: squid-tagger logs all messages through the syslog facility. They can be
d500448801 2009-10-05 c.kworr@d4daf: obtained and saved with:
d500448801 2009-10-05 c.kworr@d4daf:
d500448801 2009-10-05 c.kworr@d4daf: [/etc/syslog.conf]
d500448801 2009-10-05 c.kworr@d4daf: !squidTag
d500448801 2009-10-05 c.kworr@d4daf: *.* /var/log/squidTag
d500448801 2009-10-05 c.kworr@d4daf:
d500448801 2009-10-05 c.kworr@d4daf: [/etc/newsyslog.conf]
d500448801 2009-10-05 c.kworr@d4daf: /var/log/squidTag 644 7 1024 * J
d500448801 2009-10-05 c.kworr@d4daf:
d500448801 2009-10-05 c.kworr@d4daf: Remeber to create the file and restart syslog afterwise.