• Hello,

    When the plugin try to test if the cache working it request a test url handled by the following rule.

    rewrite ^(.*\/)?w3tc_rewrite_test([0-9]+)/?$ $1?w3tc_rewrite_test=1 last;

    URL ex : http://example.org/45fgf56w3tc_rewrite_test.css

    As the rule above doesn’t match with the test URL, and server return 404 error, the plugin give an error and didn’t processed with minifying css and, js files.

    The solution is changing the rewrite rule to something like
    rewrite ^(.*\/)?w3tc_rewrite_test(.*?)/?$ $1?w3tc_rewrite_test=1 last;

    PS: Sorry for reporting here but i didn’t find any bug reporting form.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The same for me.
    But that doesn’t fix another (related) problem which is :
    plugin’s administration pages hang for 5 seconds because of

    W3 Total Cache error: It appears Page Cache URL rewriting is not working. Please verify that all configuration files are included in the configuration file (and that you have reloaded / restarted nginx).
    Unfortunately disk enhanced page caching will not function without custom rewrite rules. Please ask your server administrator for assistance. Also refer to the install page for the rules for your server.
    Infos techniques
    nginx configuration file contains rules to rewrite url http://91.121.31.45:8080/w3tc_rewrite_test into http://91.121.31.45:8080/?w3tc_rewrite_test which, if handled by plugin, return “OK” message.
    The plugin made a request to http://91.121.31.45:8080/w3tc_rewrite_test but received:
    cURL error 28: Connection timed out after 5001 milliseconds
    instead of “OK” response.

    Whereas going to the page manually return “OK” as expected…

    Any clue ?

    Thread Starter ahriad

    (@ahriad)

    Did you reload Nginx after changing the rule?

    yep. It returns “OK” as expected, but W3TC doesn’t seem to “see” it.

    Thread Starter ahriad

    (@ahriad)

    Change the rule to
    rewrite ^(.*\/)?w3tc_rewrite_test(.*?)\/?$ $1?w3tc_rewrite_test=1 last;

    It works now, thanks 😉

    Thread Starter ahriad

    (@ahriad)

    The strange thing, that the one in original rule and my edit of it is working as rule even that both have a RegExp error!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Nginx minify and cache bug’ is closed to new replies.