Important Question and Answer (Squid – Proxy Server)-Part-3


Squid – Proxy Server:

squid solution

Dear Viewers,

Today we are discuss some important questions and answer proxy server related third part. This information is very important our professional sector. So, develop your idea……………..

Q:- (1):-  Can I make Squid proxy only, without caching anything?


Sure, there are few things you can do.

You can use the no_cache access list to make Squid never cache any response:

Acl all src 0/0

No_cache deny all

With Squid-2.4 and later you can use the “null” storage module:

Cache_dir null /null


Q:- (2):-  Can I make Squid go direct for some sites?


Sure, just use the always_direct access list.

For example, if you want Squid to connect directly to servers, you can use these lines in your config file:

acl hotmail dstdomain

always_direct  allw  hotmail

Q:- (3):-  Which log files can I delete safely ?


 You should never delete access.log, cache.log, or swap.sate while Squid is running. With Unix, you can delete a file when a process has the file opened. However, the filesystem space is not reclaimed until the process closes the file.

If you accidentally delete swap.state while Squid is running, you can recover it by following the instructions in the previous questions. If you delete the others while Squid is running, you can not recover them.

The correct way to maintain your log files is with Squid’s “rotate” feature. You should rotate your log files at least once per day. The current log files are closed and then renamed with numeric extensions (.0,.1, etc). If you want to, you can write your own scripts to achive or remove the old log files. If not, Squid will only keep up to logfile_rotate versions of each log file. The logfile rotation procedure also writes a clean swap.state file, but it does not leave numbered versions of the old files.

If you set logfile_rotate to 0, Squid simply closes and then re-opens the logs. This allows third-party logfile management systems,such as newsyslog, to maintain the log files.

To rotate Squid’s logs, simple use this command:

Squid  -k  rotate

For example, use this corn entry to rotate the logs at midnight:

0  0  *  *  *  /usr/local/squid/bin/squid  -k  rotate

                                                                                                                                              (Continue)—————- Thanks Everyone


About Author


Leave A Reply