WordPress.org

Forums

Varnish HTTP Purge
[resolved] Purge not working (5 posts)

  1. spinolacastro
    Member
    Posted 1 year ago #

    Hi, i'm running a very specific deployment of wordpress + varnish.
    Everything works fine but purges.
    I did a simple test:

    curl -X PURGE "http://myglob.example.com/" -H 'X-Purge-Method:exact'

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <title>200 Purged.</title>
    </head>
    <body>
    <h1>Error 200 Purged.</h1>
    <p>Purged.</p>
    <h3>Guru Meditation:</h3>
    <p>XID: 1355274790</p>
    <hr>
    <p>Varnish cache server</p>
    </body>
    </html>

    But if i post a blog or try purge via plugin it doesn't works besides plugin message: varnish purge flushed!

    I even can find PURGE requests on varnish log, what should i test? I'm wondering if wordpress is actually sending purge request.
    There's is a way to debug it?

    http://wordpress.org/plugins/varnish-http-purge/

  2. Can you describe this special configuration of Varnish?

    We have it running on port 80, so just by tailing the activity we can see the purge requests come and go. Are you able to monitor that? Not the varnish log, but what your site is actually doing when people visit it. That way you can run a purge request and see what happens.

  3. spinolacastro
    Member
    Posted 1 year ago #

    Hi, i'm running on Openshift Origin.
    So the varnish is behind a apache proxy:

    (APACHE PROXY) --> (VARNISH)

    I just figured out how make it work, just defined (VHP_VARNISH_IP) with http://blog.example.com and now everything works fine.

    I have a little trouble when logged users open the site, they get logged out and have to relogin. Have you seen this?
    BTW: i have W3 Total Cache enabled.

  4. BTW: i have W3 Total Cache enabled.

    Well for one, W3TC has it's own Varnish purge-0ability, so you don't need BOTH :) You should be able to use theirs.

    I have a little trouble when logged users open the site, they get logged out and have to relogin. Have you seen this?

    I've not seen that. I'd guess your VCL is a little over-agressive with cookie parsing :/

  5. spinolacastro
    Member
    Posted 1 year ago #

    I'm using the dreamhost's one with a few modifications.
    Here is the paste: https://gist.github.com/spinolacastro/7322999

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Varnish HTTP Purge
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.