Support » Plugin: W3 Total Cache » W3 Total Cache and Nginx issues

  • I am setting up a VPS with Nginx following this guide:
    http://themesforge.com/featured/high-performance-wordpress-part-3

    Caching seems to be working and the files in pgcache are being created, however on the W3TC settings page I get the following errors:

    It appears Page Cache URL rewriting is not working. If using apache, verify that the server configuration allows .htaccess or if using nginx verify all configuration files are included in the configuration.

    It appears Minify URL rewriting is not working. If using apache, verify that the server configuration allows .htaccess or if using nginx verify all configuration files are included in the configuration.

    These only display if I leave the checkbox for the ‘Verify rewrite rules’ option ticked, when I untick that box the errors disappear.

    Is there anything I need to fix in my configuration?

    Thanks

    http://wordpress.org/extend/plugins/w3-total-cache/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve been in your shoes. Getting Nginx to work with W3TC is really frustrating. First, while a nginx.conf is generated for you, it doesn’t have everything. Also, there are tonnes of blog tutorials out there are offer poor configuration advice.

    I can’t tell you how many different ways I configured my nginx.conf in ways that didn’t work. So frustrating.

    I can see two issues with the post you are using. First, some things are more complicated than they need to be, and they don’t include the generated file. Actually, they also don’t link to php-fpm with a unix socket either, which is faster as it drops some overhead.

    check out this post. It is mostly okay. A big difference here is yours is trying to use Nginx to cache while this one uses varnish to cache. (Poorly too, as it doesn’t configure varnish to strip cookies, therefore it wasn’t working out of the box).

    This is the best line I have found, and I have tried many.

    location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;
    }

    I know it looks crazy, and I only have sort of know how it works, but the point is it works. Mine does.

    Also, at the bottom of your server block, after the php-fpm section, include the generated conf file in your web root (whatever yours is).

    include /var/www/nginx.conf;

    Also, Minify rewrites are a finicky thing. There are a number of things that can kill them. I have even found certain firewall setups that kill all rewrites (and possibly more). If you have WP installed in a subdirectory of your webroot, check out this fix.

    I hope that helps some.

    I’m in the same boat. In fact I started a post on this forum which did not get a response. I am still getting the error messages which I reported 1 month ago.

    Two questions:

    • What is the likelihood of W3 Total Cache offering better native support for nginx in the future? (Is it possible? Or are there just too many server variations to make this workable).
    • Does anyone have specific fixes for drtanz and I?

    (BTW thanks for your message haddow777 – I want to know a little more about changing from the default W3TC conf settings before trying your suggestion).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘W3 Total Cache and Nginx issues’ is closed to new replies.