[squid-users] log rotation
Hello, I have looked at wiki but cannot find information about log rotation (access store logs). How can I do this? Or is it simply a matter of defining log rotation in newsyslog.conf (I am on a FreeBSD system)? Thank you! -- Zbigniew Szalbot
Re: [squid-users] log rotation
Hello, On Wed, 25 Jul 2007 18:50:27 +0545, Tek Bahadur Limbu [EMAIL PROTECTED] wrote: Zbigniew Szalbot wrote: Hello, I have looked at wiki but cannot find information about log rotation (access store logs). How can I do this? Or is it simply a matter of defining log rotation in newsyslog.conf (I am on a FreeBSD system)? Hi Zbigniew, Go to: (1.) cd /usr/ports/sysutils/logrotate (2.) make install clean (3.) cd /usr/local/etc (4.) vi /usr/local/etc/logrotate.conf Put the following in logrotate.conf Thank you very much indeed! But I managed in a (I think) simpler way by adding /usr/local/squid/logs/access.log squid:squid 644 7 * @T00 J /usr/local/squid/logs/squid.pid 30 to newsyslog.conf. But I appreciate such a thorough description! Warm regards, Zbigniew Szalbot # Start of logrotate.conf ### # rotate log files weekly #weekly daily # keep 4 weeks worth of backlogs rotate 7 # send errors to root #errors root # create new (empty) log files after rotating old ones create # uncomment this if you want your log files compressed compress # RPM packages drop log rotation information into this directory include /usr/local/etc/logrotate.d /var/log/lastlog { monthly rotate 12 } End of logrotate.conf ## (5.) mkdir -p /usr/local/etc/logrotate.d/ (6.) cd /usr/local/etc/logrotate.d/ (7.) vi /usr/local/etc/logrotate.d/squid Put the following: ###Start of squid# /var/log/squid/access.log { daily rotate 90 copytruncate compress notifempty missingok } /var/log/squid/cache.log { daily rotate 7 copytruncate compress notifempty missingok } (8.) /usr/local/sbin/logrotate -d /usr/local/etc/logrotate.conf (9.) /usr/local/sbin/logrotate -f /usr/local/etc/logrotate.conf If some errors are reported, it's normal, just create or touch the relevant files or directories. (10.) vi /etc/crontab Put the following: 0 1 * * * root/usr/local/sbin/logrotate /usr/local/etc/logrotate.conf /dev/null 21 (11.) If all works well, you are good to go!!! Of course, the other simple way of doing this is to run: squid -k rotate from /etc/crontab 0 1 * * * root squid -k rotate Thanking you... Thank you! -- With best regards and good wishes, Yours sincerely, Tek Bahadur Limbu (TAG/TDG Group) Jwl Systems Department Worldlink Communications Pvt. Ltd. Jawalakhel, Nepal http://www.wlink.com.np -- Zbigniew Szalbot -- Zbigniew Szalbot
[squid-users] suqid proxy and localhost problem
Hello, I am quite new to squid. I did a very minimal configuration started the software, configured browsers and all seems ok. With one exception. The box on which I run squid does not open http pages which it serves. Can you advise me what I need to set up to allow this box to talk to me on port 80? For now, I do not use any SSL, squid is configured with the default port. Here is the information from cache.log 2007/07/05 13:32:07| Using kqueue for the IO loop 2007/07/05 13:32:07| DNS Socket created at 0.0.0.0, port 52483, FD 5 2007/07/05 13:32:07| Adding nameserver 194.204.152.34 from /etc/resolv.conf 2007/07/05 13:32:07| User-Agent logging is disabled. 2007/07/05 13:32:07| Referer logging is disabled. 2007/07/05 13:32:07| Unlinkd pipe opened on FD 10 2007/07/05 13:32:07| Swap maxSize 512000 KB, estimated 39384 objects 2007/07/05 13:32:07| Target number of buckets: 1969 2007/07/05 13:32:07| Using 8192 Store buckets 2007/07/05 13:32:07| Max Mem size: 8192 KB 2007/07/05 13:32:07| Max Swap size: 512000 KB 2007/07/05 13:32:07| Rebuilding storage in /usr/local/squid/cache (CLEAN) 2007/07/05 13:32:07| Using Least Load store dir selection 2007/07/05 13:32:07| Set Current Directory to /usr/local/squid/cache 2007/07/05 13:32:07| Loaded Icons. 2007/07/05 13:32:07| Accepting proxy HTTP connections at 0.0.0.0, port 3128, FD 12. 2007/07/05 13:32:07| Accepting ICP messages at 0.0.0.0, port 3130, FD 13. 2007/07/05 13:32:07| WCCP Disabled. 2007/07/05 13:32:07| Pinger socket opened on FD 15 2007/07/05 13:32:08| NETDB state reloaded; 24 entries, 312 msec 2007/07/05 13:32:08| Ready to serve requests. 2007/07/05 13:32:08| Done reading /usr/local/squid/cache swaplog (618 entries) 2007/07/05 13:32:08| Finished rebuilding storage from disk. 2007/07/05 13:32:08| 618 Entries scanned 2007/07/05 13:32:08| 0 Invalid entries. 2007/07/05 13:32:08| 0 With invalid flags. 2007/07/05 13:32:08| 618 Objects loaded. 2007/07/05 13:32:08| 0 Objects expired. 2007/07/05 13:32:08| 0 Objects cancelled. 2007/07/05 13:32:08| 0 Duplicate URLs purged. 2007/07/05 13:32:08| 0 Swapfile clashes avoided. 2007/07/05 13:32:08| Took 0.3 seconds (1887.1 objects/sec). 2007/07/05 13:32:08| Beginning Validation Procedure 2007/07/05 13:32:08| Completed Validation Procedure 2007/07/05 13:32:08| Validated 618 Entries 2007/07/05 13:32:08| store_swap_size = 3512k 2007/07/05 13:32:08| storeLateRelease: released 0 objects Thank you very much in advance for your help!
Re: [squid-users] suqid proxy and localhost problem
Hello, On Thu, 05 Jul 2007 09:37:29 -0300, Isnard Jaquet [EMAIL PROTECTED] wrote: Hi, I don't think I understand what you mean. Are you trying to connect to port 80 of your proxy? Is that it? Is apache installed and running (on port 80)? If it is, put the ip address of it in the exceptions list on your browser or disable the proxy from it when trying to connect to the apache on your proxy server. Yes, sorry - I mean I could not connect to Apache on port 80 for that box. Your advice is all I needed. Added that IP to the exceptions list in the browser and works well. Thank you to all of you for being so helpful! -- Zbigniew Szalbot