Monday, January 14, 2008

The squid Proxy Server

The squid proxy server is a caching proxy server compatible with FTP,
HTTP, and SSL.
1.Reduce bandwidth demands due to multiple requests for popular
Web pages.
2.Control access to external Web sites by means of Access Control Lists
(ACLs).
3.Accelerate an HTTP server.

To accelerate an HTTP server, the proxy typically runs on port 80, the
usual HTTP port.The default configuration file is /etc/squid/squid.conf.

To start the service:
service squid start

To configure a Web browser to use squid, set the browser’s proxy host to the host name of the system running squid and set the proxy port to the port on which squid is running, generally 3128.

Setting hostname

Squid will fail to start if you don't give your server a hostname.Here, I set the hostname to the real name of the server pubudu.
If you have a static IP address, then /etc/hosts is configured as follows:

127.0.0.1 localhost.localdomain localhost
192.168.10.110 pubudu.mydomain.com pubudu

After updating the /etc/hosts file correctly, the "hostname" command should be run as follows to set your hostname:

hostname pubudu.mydomain.com

test using hostname -a

Since this is a static IP address, then /etc/sysconfig/network is configured as follows:

NETWORKING=yes
HOSTNAME="mybox.mydomain.com"

This is checked with the following command:

cat /proc/sys/kernel/hostname

No comments: