This post describes how to use Apache2 with Pound as a proxy server. To install and configure Pound to be a proxy server for Apache2, then the steps below are a good starting point. Pound is an open-source HTTP accelerator. It is usually configured to sit in front of web servers to quickly serve HTTP/HTTPS requests. Pound can also be used as a load balancer to distribute loads across multiple web servers. When you configure Pound to be the font-end to Apache2 or other web servers, it can greatly enhance the server’s performance. This is because Pound stores web caches in the system’s memory ensuring faster retrieval in subsequent requests for the same resource. To get this working, follow the steps below:

Install Apache2 HTTP Server

First, run the commands below to install the Apache2 webserver. After installing Apache2, the commands below can be used to stop, start and enable Apache2 to always startup every time the server boots up. By default apache2 HTTP service automatically is bound to ports 80 and 443 for HTTPS. This

Install Pound Proxy Server

Now that Apache2 is installed, run the commands below to install Pound After installing Pound, the commands below can be used to start, stop and enable Varnish to always start up when the server boots

Switch the Apache2 default post to 8080

Since we want Pound to listen for all traffic coming to port 80 which is Apache2 default port, let’s configure Apache2 to use another port number. You can open the Apache2 default port configuration file at /etc/apache2/ports.conf and change the Listen value to 8080. To quickly change the port run the commands below to open the Apache2 default port configuration file. Then make sure the file has these lines. Save when done. Next, open the Apache2 default virtual host config file. Then make the highlighted change below. Save the file and exit. Then restart Apache2 Now to access Apache2, you’ll have to enter the server IP or hostname followed by port # 8080. ex. http://localhost:8080

Configure Pound to use Port 80

Now that port 80 is free, let’s configure Pound to use that post instead. To assign port 80 to Varnish, run the commands below. Pound default configure file is located at /etc/pound/pound.cfg Open it by running the commands below: Then look for the config block under listen, redirect and .. and make the highlighted changes as shown below. Use the server IP address and not the loopback (127.0.0.1) Save the file and close. Next, run the commands to open the Pound default startup script config. Then change the value to 1 Save the file. After that, restart both Apache2 and Varnish If everything is set up correctly, Pound should be the default listener of port 80. Congratulations! You’ve just installed Apache2 with Pound support. If you followed the steps above and can’t still get Pound to listen on port 80, run the commands below to create Pound socket control directory if it’s not already there. During my test, the folder above was missing. You may also like the post below: