Comments (4)
ok I figured it out. I needed to set
map $scheme $https_suffix { default '-https'; https '-https'; }
in the common.conf
Thanks!
from wordpress-nginx.
Hi,
Thanks for creating a new issue.
Please forgive my ignorance. I could not understand what you are trying to say.
for example in example.com.conf, if you include any of the caching plugins you'll always see the header X-CACHE MISS.
No. I use example.com.conf too with WP Super Cache as the caching plugin on my site https://www.tinywp.in . You would see "x-cache" "miss" header in it only when the cache is not filled. Once filled (after the first visit), you wouldn't see "x-cache" "miss". Instead, you'd see "x-cache" "hit".
Do you have a test site where I can see a different behavior to understand what you are trying to say?
from wordpress-nginx.
I'm actually using WP Rocket.
Heres my observation.
I always see the MISS header, but none of the other headers in location /. However, I know we're serving the cached instance because I can see the page source with the annotation. Further I know the location / is being executed because I can do a return 404 and see the 404. For whatever reason the headers are getting lost.
<!-- This website is like a Rocket, isn't it? Performance optimized by WP Rocket. Learn more: https://wp-rocket.me - Debug: cached@1540280391 -->
from wordpress-nginx.
Heres another example. I would never see the header foo bar here. I think this is because, per the documentation, location definitions in nginx inherit headers of the parent, however, if you specify headers in a location header that executes it overwrites the parent.
` location ~* .php$ {
fastcgi_split_path_info ^(.+.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) { return 404; }
# Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_param HTTP_PROXY "";
include "fastcgi_params";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
fastcgi_pass fpm;
add_header "X-CACHE" "MISS";
}
include "globals/wp-rocket.conf";
add_header foo bar;
`
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
- 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
- Great work. Question about wp-super-cache conf for Nginx HOT 5
- 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.