Support » Plugin: iQ Block Country » Which cache plugin work with IQ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Pascal


    Hi Jangsan,

    The plugin can work with Varnish, nginx or other real caching software as long as they are configured properly.

    Of course due to the fact pages get cached in Varnish or other caching software the cache may display a page to a unwanted visitor from a country.

    My plugin makes sure that a “You are not allowed here” message does not get cached by caching software as that would be bad.

    If you are able to install a real Varnish server there are ways to do the Geo blocking on the varnish server making this plugin irrelevant.


    Thanks for your responded. I don’t know how to configure the Varnish to work with IQ.

    I tried to install the Real Ip module. And checked that the Real-ip worked as well. And the WordPress can get the Real ip. But the IQ failed.

    So I rebuild the Server for IQ plugin. Yes, there are some ways can block a Country.

    And I spend 7days to install the Geoip on Varnish. I search lots of Geoip installation Tutorials on Google.and tried to setup the server follow the tutorials. But all of the tutorials not work for me. Both of them I don’t understand. Because they are not detailed.

    I think the problem is at my end. Because I m not good at English

    Plugin Author Pascal


    The real issue is that it does not make much sense to use the iQ Block Country plugin on a site that uses caching other than to block hits on the admin site.

    The primary point of using a cache is to not serve wordpress pages from within wordpress but have them cached for X time to make the site faster for high volume sites.

    To configure Varnish so it performs the best with your site you probably should hire a Varnish specialist / system engineer that can fine tune the configuration.


    To help jangsan, here is what I did:
    1. Install nginx + varnish (via Apachebooster for cPanel)
    2. install mod_reverseproxy (
    3. install (

    On Apach 2.4 mod_rpaf will not install unless you edit the installation file and replace “remote_” with “client_” in “mod_rpaf-2.0.c”

    The above gave me ther right IP on Apache logs and the right remote address on PHP.

    —- BUT —-

    HTTP_X_REAL_IP is what nginx will give to you.

    @pascal, can you add this check first?
    On line 175 of main pllugin file the function iqblockcountry_get_ipaddress will check the HTTP_X_FORWARDED_FOR
    So, can you please add a check for HTTP_X_REAL_IP first? This should make it compatible with nginx / varnish.

    Thank you in advance.

    Best regards,

    Plugin Author Pascal


    Hi Spyros,

    I’ve added this to the current beta version

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Which cache plugin work with IQ?’ is closed to new replies.