WordPress Varnish is a simple plugin that purges new and edited content.
I have provided a simple VCL that can be used as a reference.
Yes. Activating the plugin site-wide will provide the functionality to all blogs. Configuration can be done on the blogs individually, or can be global. If you want to configure Varnish servers globally, edit wp-config.php and include these lines just before "That's all, stop editing!" message:
global $varnish_servers; $varnish_servers = array('192.168.0.1:80:secret','192.168.0.2:80:secret'); define('VARNISH_SHOWCFG',1);
The varnish servers array will configure multiple servers for sending the purges. If VARNISH_SHOWCFG is defined, configuration will be shown to all users who access the plugin configuration page (but they can't edit it).
You could install Apache's mod_rpaf module: http://stderr.net/apache/rpaf/
or, in wp-config.php, near the top, put the following code:
$temp_ip = explode(',', isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : (isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] : $_SERVER['REMOTE_ADDR'])); $remote_addr = trim($temp_ip); $_SERVER['REMOTE_ADDR'] = preg_replace('/[^0-9.:]/', '', $remote_addr );
The code takes some of the common headers and replaces the REMOTE_ADDR variable, allowing plugins that use the surfer's IP address to see the surfer's IP rather than the server's IP.
Requires: 2.9.2 or higher
Compatible up to: 3.6.1
Last Updated: 2 years ago
Active Installs: 1,000+
Got something to say? Need help?