Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to have an add_header directive inside a location block of the nginx.conf (inside the document root) generated by W3 Total Cache like this

# BEGIN W3TC Page Cache cache
location ~ /wp-content/cache/page_enhanced.*html$ {
expires modified 3600s;
add_header Vary "Accept-Encoding, Cookie";
add_header MyHeader "Value";
}
location ~ /wp-content/cache/page_enhanced.*gzip$ {
gzip off;
types {}
default_type text/html;
expires modified 3600s;
add_header Vary "Accept-Encoding, Cookie";
add_header Content-Encoding gzip;
add_header MyHeader "Value";
}
# END W3TC Page Cache cache

Since W3 Total Cache overwrites this file I'd to know a method to keep it permanent.

share|improve this question

closed as off-topic by Mark Kaplun, Pieter Goosen, bungeshea, ialocin, G. M. Aug 22 at 9:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – Mark Kaplun, Pieter Goosen, bungeshea, ialocin, G. M.
If this question can be reworded to fit the rules in the help center, please edit the question.