I want to keep the exact same settings as below in all folders, except for one. In the folder /wp-admin the setting add_header Cache-Control \"no-store\";
shoul
Any location block that processes PHP files needs to contain all of the fastcgi parameters and directives. See this document on request processing.
I have not tested this, but you should be able to use a map
directive to select the appropriate value for the add_header
statement.
For example:
map $request_uri $cc {
~^/wp-admin "no-store";
default "public";
}
server {
...
location ~ \.php$ {
add_header Cache-Control $cc;
...
}
}
See this document for details.