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

0

Squid – Proxy Server:

Dear Viewers,

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

Q:- (1):- How do I configure Squid forward all request to another proxy?

Answer:-

Note: the information here is current for version 2.2

First, you need to give Squid a parent cache. Second, you need to tell Squid it can not connect directly to origin servers. This is done with three configuration file lines:

Cache_peer parentcache . foo . com parent 3128 0 no-query default

acl all src 0 . 0 . 0 . 0/ 0 . 0 . 0 . 0

never_direct allow all

Note, with this configuration, if the parent cache fails or becomes unreachable, then every request will result in an error message.

In case you want to be able to use direct connections when all the parents go down you should use a different approach:

 cache_peer parentcache . foo . com parent 3128 0 no-query

prefer_direct off

The defult behaviour of Squid in the absence of positive ICP, HTCP, etc replies is to connect to the origin server instead of using parents. The prefer_direct off directive tells Squid to try parents. The prefer_direct off directive tells Squid to try parents first.

Q:- (2):- How can I easily change the default HTTP port?

Answer:-

Before you run the configure script, simply set the CACHE_HTTP_PORT environment variable.

Setev  CAVHE_HTTP_PORT 8080

. / configure

make

 make install

Q:- (3):- What cache dir size should I use?

Answer:-

Most people have a disk partition dedicated to the Squid cache. You don’t want use the entire partition size. You have to leave some extra room. Currently, Squid is not very tolerant of running out of disk space.

Lets say you have have a 9GB disk. Remember that disk manufacturers lie about the space available. A so-called 9GB disk usually results in about 8.5GB of raw, usable space. First, put a filesystem on it, and mount it. Then check the “available space” with your df program. Note that you lose some disk space to filesystem overheads, like superblocks, inodes, and directory entires. Also note that Unix normally keeps 10% free for itself. So with a 9GB disk, you’re probably down to about 8GB after formatting.

Its better to start out conservative. After the cache becomes full, look at the disk usage. If you think there is plenty of unused space, then increase the cache_dir setting a little.

If you’re getting “disk full” write errors, then you definitely need to decrease your cache size.

Q:- (4):-  I’m adding a new cache dir, Will I lose my cache?

Answer:-

With Squid-1.1, yes, you will lose your cache. This is because version 1.1 uses a simplisitic algorithem to distribute files between cache directories.

With Squid-2, you will not lose your existing cache. You can add and delete cache_dir’s without affecting any of the others

                                                                                                                                      (Continue) ——————– Thanks Everyone

Share.

About Author

TN365

Leave A Reply

Powered by themekiller.com