WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] All pages except home give 404 error when minify on (5 posts)

  1. Jon Scaife
    Member
    Posted 1 year ago #

    I'm using W3TC with nginx on a VPS. Whenever I enable minify I get 404 errors on all pages except for the homepage.

    For what it's worth I can fix this by commenting out 3 lines that W3TC creates in nginx.conf, but I don't know what the lines do...

    if ($http_accept_encoding ~ gzip) {
    set $w3tc_enc .gzip;
    }

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

  2. Pothi
    Member
    Posted 1 year ago #

    Those lines will check, if the browser accepts gzip encoding. If yes, then it'd search for gzipped file to fetch from the cache.

  3. Jon Scaife
    Member
    Posted 1 year ago #

    well, yes, that's what they appear to do, but why do they result in 404 errors? I can only assume that for some reason that gziping isn't happening, altho i have it enabled in my nginx conf

  4. Pothi
    Member
    Posted 1 year ago #

    I just tested minify with the default settings in W3TC version 0.9.2.8 on an Nginx server. You are right. It produces 404 on all pages, except the home page. It is due to a 'similar' bug that is already mentioned at http://wordpress.org/support/topic/bug-disk-enhanced-caching-on-nginx-fails-due-to-a-typo-in-the-nginxconf-file?replies=6#post-3837623 . Applying the fix mentioned in that post, fixes the 404 issue you mentioned too. Please take a backup of your existing configuration. I tested it only on a development environment. What works for in a development environment, may not work in a production environment with different plugins, theme, etc.

  5. Jon Scaife
    Member
    Posted 1 year ago #

    You're a star. Thank you very much for your help! :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic