[olug] Squid setup
Jon H. Larsen
relayer at omahadirect.net
Thu Jan 2 15:00:00 UTC 2003
Craig,
I'm running Squid on a Pentium 150 MHz with 64 MB Ram, and a 300 Meg
cache and it works great - we have about 45 users.
Here are a few helpful things from my squid conf.
First off, we had problems with caching of PDF files from our own servers.
(Same PDF name, newer version). So, I threw this together.
# deny caching on PDF files
acl PDF url_regex .pdf$
no_cache deny PDF
Next, a section on adult site blocking. This was in
the Squid FAQ, question 10.12. I looked at all of them and basically put
them together in some form.
The 'deny_info' statement is a custom HTML file that is displayed when a
site on the list is visited.
# deny pornographic sites
acl porn url_regex "/usr/local/squid/etc/porn"
acl porn1 url_regex "/usr/local/squid/etc/porn1"
acl noporn url_regex "/usr/local/squid/etc/noporn"
deny_info ERR_ACCESS_DENIED porn porn1
http_access allow noporn all
http_access deny porn all
http_access deny porn1 all
Finally, you can prevent the caching of an individual site.
# deny cache of tux.foo-bar.com
acl FOO url_regex ^http://tux.foo-bar.com/$
no_cache deny FOO
Also, you may want to setup the logfile_rotate option, and create a cron
entry to initiate it.
in squid.conf
logfile_rotate 10
in my cron.weekly: squidrotate
#!/bin/sh
#
/usr/local/squid/bin/squid -k rotate
Hope this helps,
Jon L.
On Thu, 2 Jan 2003, Craig Wolf wrote:
> Date: Thu, 02 Jan 2003 07:57:08 -0600
> From: Craig Wolf <CJWolf at mpsomaha.org>
> Reply-To: olug at olug.org
> To: olug at olug.org
> Subject: Re: [olug] Squid setup
>
> Thanx to all for the links! I will be going through them over the next
> week to get this thing up and running properly. The machines aren't
> great machines (233MHz) but they do have 512MB ECC Ram and Raid 5 on the
> HD's (Raid Array card, not software).
> I will have to say that m0ntar3, you are over my head with your basic
> computer science stuff. I felt pretty good about my
> background/knowledge until I saw this paragraph. Where do you work to
> need to know this or is that just a hobby to improve your mind? Anyhow,
> thanx again for everyone's pointers!!
>
>
> Craig Wolf
> Linux Web Server Support
> Backup Supervisor
> Desktop/Network Specialist
> 402-894-6283
>
>
> >>> m0ntar3 at cox.net 12/30/2002 >>>
> Pardon the excitement, but web caching is just about the coolest topic
>
> I've come across in a while. It's one of those things that makes a
> person (me) stop and think. This type of cacheing if probably one of
> thee best things an administrator can do for an organisation's network.
>
> And it's contains so many of the ideas they teach in basic computer
> science; Amdahl's Rule, Principle of Locality, Graph Theory (Flow
> Diagrams), Algorithms (distributed systems; peering what-have-you),
> Protocols ... and all that blah blah ... it's all in there.
>
> Craig Wolf wrote:
>
> >I have a working, and I use that term loosely, Squid cacheing server
> but
> >I need a little help from those that have a know with Squid.
> Attached
> >is my Squid.conf file. Would anyone be kind enough to give me any
> >pointers as to what else to change to make things better? This is a
> >test we are running in the 3 high schools at Millard to see what
> >OS/Software to run a cacheing server on and you KNOW that I am
> >championing the cause. Anyhow, any hints or suggestions would be
> >GREATLY appreciated!! TIA!
> >
> >
> >Craig Wolf
> >Linux Web Server Support
> >Backup Supervisor
> >Desktop/Network Specialist
> >402-894-6283
> >
> >
> >
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
>
--
[ Jon H. Larsen - email: relayer at omahadirect dot net ]
[ ICQ#: 10412618 - http://www.animesunday.org/jonl ]
[ PGP Pubkey - http://www.animesunday.org/jonl/relayerpubkey.txt ]
More information about the OLUG
mailing list