To enable Drupal Clean URL's on a host running Debian 7 (Wheezy), two following steps will be required in order use the core Drupal URL Aliases module. First you will need to enable the apache rewrite module, once enabled you will then need to update the virtual host file to allow for overrides. Once these steps have been completed, you will then need to either restart or reload Apache.
By default, after installing Varnish you may notice that the client IP address listed in the Apache log files is 127.0.0.1. If you have configured Varnish to listen for traffic on port 80 and forward all non-cached traffic onto Apache. Apache sees this a local request so the IP address will appear to be 127.0.0.1. This can prove to be annoying when debugging your site or if you ever have the need to block requests made by a particular IP address. To solve this problem we will need to enable vcl_rev in our default.vcl file and configure it to forward the client IP address. Then we will need to configure apache to support a new LogFormat, and then we will need to modify our virtual hosts to support the new format. This tutorial assumes that you already have Varnish configured with Apache and it is working as expected.
Name-based virtual hosting allows for hosting multiple websites with different domains and subdomains on a single server. To configure a web server for name-based virtual hosting, you will need to add a virtualhost configuration and for this example I am using Apache2. This tutorial was tested against Debian 6 Squeeze, but should be applicable for most linux operating systems. For this example we will use the nano as a command line editor, but you could use vi, gedit, or any other preferred editor. Also for the example, I will use sub.example.com as a placeholder, which will need to be modified to reflect the domain name or subdomain that you intend to use for your virtualhost. The domain chosen in the example is for a subdomain, but by simply dropping the prefix of “sub.” the virtualhost will instead then be valid for the primary domain of “example.com”.