Comments (5)
Super, thank you Pothi. What a valuable contribution to the community. Much appreciated!
from wordpress-nginx.
Thank you for your time to test the configuration in this repo.
WP Super Cache creates mobile version of the cache for the home page at wp-content/cache/supercache/example.com/index-mobile.html
(for non-https sites) or at /wp-content/cache/supercache/example.com/index-https-mobile.html
(for HTTPS sites). So, in /wp-content/cache/supercache/$host${uri}index$https_suffix-mobile.html
, the following are variables...
$host
$uri
$https_suffix
https_suffix
is defined at https://github.com/pothi/wordpress-nginx/blob/master/conf.d/common.conf#L35-L36 . It is used by WP Rocket plugin as well. So, it is defined in a common place to avoid duplication in code. So, suffix-mobile
doesn't mean anything. It is actually https_suffix
that has a meaning in the above code.
Our theme is completely responsive. Same pages and URLs get served to all devices. Is this still relevant to us?
No, not relevant to your theme. 99% of sites don't use a separate mobile cache. That's why the mobile cache is not enabled by default. Just updated the inline documentation to reflect this point. Please see https://github.com/pothi/wordpress-nginx/blob/master/globals/wp-super-cache.conf#L37-L42 .
from wordpress-nginx.
Quick additional question. I'm not seeing the X-Cache
header at all. Reference to this:
try_files "/wp-content/cache/supercache/$host${uri}index-https.html" $uri $uri/ /index.php$is_args$args;
#--> all the following would apply, only if the request hits the cache
add_header "X-Cache" "HIT - WP Super Cache";
Any ideas on how to diagnose why Nginx is not picking up the cached file? Looking manually at the folders on our server, the files do exist. I can also query the files with the path name manually typed in browser for the supercache path. Note that the https is hardcoded in our case, because we only have forced https. No http version of the site.
Welcome any thoughts!
from wordpress-nginx.
Best way to debug is to enable debug log in Nginx and run a single request to diagnose further. Please see https://nginx.org/en/docs/debugging_log.html#clients under the header "Debugging log for selected clients" to debug selected clients.
From what I can guess, the cached content may be located at /cms/wp-content/cache/supercache/$host${uri}index-https.html
in your particular installation.
from wordpress-nginx.
Thank you. This is very helpful. Unfortunately our Nginx is not compiled with --with-debug
capability. You're right, we should have the /cms/ at the front. Even with that though it doesn't seem to be bringing the super-cache page. Hmm..
from wordpress-nginx.
Related Issues (20)
- Openshift HOT 1
- SSL Compatibility for WP Super Cache
- Mobile Compatibility for WP Super Cache HOT 1
- $wpsc HOT 2
- common-locations.conf not found HOT 1
- No more.. HOT 3
- WP Fastest Cache configuration HOT 1
- Feature Request: NGINX's FastCGI cache HOT 2
- Woocommerce? HOT 1
- Which files should I review to learn more about multisite configuration? HOT 1
- https_suffix.html problem HOT 4
- add_header is being overwritten by location blocks HOT 4
- Wp Rocket Nginx Question HOT 3
- About Rocket-nginx. HOT 6
- Fix robots.txt in sub-sites in a WP multisite network
- force trailing slash to front end only. HOT 1
- Incredible. Thank you! HOT 2
- can you help me HOT 8
- Not compatible with WooCommerce? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-nginx.