Configuring Squid as a server surrogate
To configure Squid as a server surrogate, we need to provide the appropriate options with various directives, depending on the requirements. We can configure Squid to act as a forward proxy and server surrogate at the same time. However, the access control rules must be written very carefully in such cases, which we will cover in our special section on Access Control Configuration for surrogate servers. However, to omit any possible confusion, it's always better to have a dedicated instance of Squid for server acceleration and a separate instance for the forward proxy.
Also, as Squid will be listening on port 80 to accept HTTP requests, our web server can't listen on the same IP address as Squid. In this scenario, we have the following options:
Squid can listen on port 80 on the public IP address and the web server can listen on port 80 on the loopback (
127.0.0.1
) address.The web server can listen on port 80 on a virtual network interface with an IP...