Varnish is a web accelerator. Its mission is to sit in front of a web server an cache the content. It makes your web site go fast.
In this mode, Varnish will stop incomplete HTTP requests from reaching your Apache webserver.
Varnish is distributed in the Debian package repositories, but the version there might be out of date, and generally recommend using the packages provided by varnish-cache.org or packages from backports.debian.org.
To use the varnish-cache.org repository and install varnish, do the following:
Change Varnish settings:
1. First change the default port. Edit /etc/default/varnish:
Virtual hosts are used to run more than one web site on a single machine.
Virtual hosts can be “IP-based”, meaning that you have a different IP address for every web site, or “name-based”, meaning that you have multiple names running on each IP address.
# Check if is root
if [ "$UID" -ne "$ROOT_UID" ]
echo “You must be root to run this script.”
if [ -n "$1" ]
echo “You must provide a full domain name for this site, i.e. ‘example.com’ ”
echo -n “Run this script like ./script example.com .”
#Create document root site folder
mkdir -p $WWW_ROOT/$DOMAIN
On Debian systems … Apache comes with mod_status compiled by default.
mod_status provides information on the Apache server activity and performance.
This tutorial will show you how to enable this feature, so that only requested issued from localhost are accepted and served.
Setting mod_status up:
By default, server status report is commented so you can not access it. To enable it, you need to uncomment from /etc/apache2/apache2.conf:
<Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from .your_domain.com </Location>
mod_slotlimit is an Apache module that using dynamic slot allocation algorithm and static rules, can manage resources used for each running site.
Step 1. Preparing Your system
In order to compile mod_slotlimit, you will need to have apxs2 (APache eXtension tool) installed and configured with Apache.
Use the following command to install
apt-get install apache2-prefork-dev build-essential
Step 2. Download the source package from here
Step 3. Open archive, compile and install module with those commands: