WordPress and Varnish comment IPs

If your WordPress install is behind Varnish you may have issues with Comments showing your Server IP. This will also cause problems with Spam as Akismet will not be able to check the source IP.

In the vcl_recv part of your varnish config add this

set req.http.X-Forwarded-For = client.ip;

Then edit your WordPress wp-includes/comment.php and replace REMOTE_ADDR with HTTP_X_FORWARDED_FOR
Then edit your wp-content/plugins/akismet/akismet.php and replace REMOTE_ADDR with HTTP_X_FORWARDED_FOR

Restart varnish

/etc/init.d/varnish restart

Finished, test by commenting.

Note: Users experiencing spam on PrimaryBlogger should now experience less spam and more accurate comment filtering.

If you are running Varnish 2.1.2 RPCXML will not work, you need to upgrade to 2.1.3..  You can find out your version by typing


varnishd -V

Using Classdroid with any WordPress site


Classdroid allows you to upload to any wordpress site.
PrimaryBlogger supports this by default.

Either a) Download & install this plugin

or b) Goto Settings, Writing then click Enable XML-RPC (Bottom option of the Writing settings page)

Classdroid public beta

Here is the Classdroid apk for public beta. We only have support for primaryblogger and xparena(not a live service) available right now. We are waiting on Moodle V2 to bring moodle support in.

1. Get the Classdroid.apk
2. Read this guide for how to install an .apk
3. Make sure you have a Primaryblogger account & Blog
4. Have fun 🙂

Note:  We still have a lot of GUI tweeking to do but most of the functionality now exists. We will be releasing the source code once beta testing is complete.

Thanks to this guy for the great custom artwork/logo/icon!

Go here for info on classdroid