W3 cache not behaving on nginx install.
-
So first of all I’ve used this plugin on a lot of apache sites and apache behind nginx proxy and had no issues. This is the first time I’ve tried to use it on an nginx-only WordPress install.
I’ve followed the instructions on the wiki, and have included the nginx.conf file in the server root, which W3Total cache wrote out for me. I’ve reloaded nginx, and confirmed that the config is in use (nginx -T).
However we’re getting the message saying the nginx config is not loaded.
“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).” and “nginx configuration file contains rules to rewrite url https://domain.com/w3tc_rewrite_test into https://domain.com/?w3tc_rewrite_test which, if handled by plugin, return “OK” message. The plugin made a request to https://domain.com/w3tc_rewrite_test but received: 404 Not Found instead of “OK” response”
I’ve manually checked the URL and indeed we see a 404, so the rewrite is not working. I saw a thread saying that the position of the include was important, so I’ve tried many different positions in the nginx config. Currently its right at the top, before anything else. Still not working. The rule says#BEGIN W3TC Page Cache core
rewrite ^(.*\/)?w3tc_rewrite_test([0-9]+)/?$ $1?w3tc_rewrite_test=1 last;So that should be working, but isn’t.
The second thing we tried was to turn on debug. But with debug on, we’re expecting to see a message in the HTML source, but there is nothing.
Other W3TC features such as the js minify and the lazy loader seem to be injected into the page OK, but no debug message, and apparently no caching happening!
Any suggestions for where I can look next, or any known problems with nginx implementations? Anyone else having these issues?
- The topic ‘W3 cache not behaving on nginx install.’ is closed to new replies.