SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
Varnish
Primary tabs
Pressflow and Drupal 7 allow you to use an HTTP accelerator such as Varnish
Apache Configuration
Adjust your Apache configuration to server the Drupal site on port 8080. Edit your Apache conf file and add:
Listen 8080
NameVirtualHost *:8080
Restart Apache and make sure you can access your site on that port.
Varnish Configuration
Rather than change the default Varnish conf file, we'll create one just for Drupal:/usr/local/etc/varnish/drupal.vcl
with Fourkitchens' basic configuration for Varnish 3.x and Drupal 7.
Drupal 7.x configuration
Edit your site's settings.php
file and add some proxy settings:
$conf['reverse_proxy'] = TRUE;
$conf['reverse_proxy_addresses'] = array('127.0.0.1');
$conf['reverse_proxy_header'] = 'HTTP_X_FORWARDED_FOR';
#$conf['omit_vary_cookie'] = true;
$conf['page_cache_invoke_hooks'] = false;
$conf['cache'] = 1;
$conf['cache_lifetime'] = 0;
$conf['page_cache_maximum_age'] = 21600;
Enable Drupal's page cache in admin/config/development/performance and set the Caching Mode to External and Page Cache Maximum Age to an appropriate value (anything over 0).
Varnish Module
Add to your settings.php file:
// Add Varnish as the page cache handler.
$conf['cache_backends'] = array('sites/all/modules/varnish/varnish.cache.inc');
$conf['cache_class_cache_page'] = 'VarnishCache';
// Drupal 7 does not cache pages when we invoke hooks during bootstrap. This needs
// to be disabled.
$conf['page_cache_invoke_hooks'] = FALSE;
Testing Varnish
You can test that Varnish is serving a cached page or not with:
curl -I http://yoururl.com
Resources
- Implementing Pound-Varnish-LAMP for secure HTTP acceleration
- Varnish device detection and redirect to mobile site
- Configuring Varnish for High-Availability with Multiple Web Servers
- Boosted Varnish - High Performance Caching made easy
- Configuring Varnish for High-Availability with Multiple Web Servers
- Drupal and Varnish - some different adjustments for caching different stuff
- Varnish and Pressflow (Drupal) - VCL tweaks for achieving a high hitrate
- Varnishing over Drupal
- Pressflow, Varnish and Caching … oh my! - their Google Analytics cookie code works. Also a sample VCL file
- https://wiki.fourkitchens.com/display/PF/Configure+Varnish+for+Pressflow
- http://janaksingh.com/blog/install-pressflow-drupal-varnish-apc-and-apache-centos-55-130
- Using Pressflow behind a reverse proxy cache
- Drupal, Varnish and Pressflow, Fast delivery to the customer with some speed for users too
- Example Varnish VCL for Drupal/Pressflow Sites
- Caching with Varnish, Drupla 7 and Cache Actions
- ESI, use Varnish as cache for authenticated users in Drupal
- Improving Varnish Hit Rates with Drupal 7
- WebKit doesn't respect Vary:Cookie header
- Safari + Cache-Control with Vary Bug
- Log in to post comments