Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Exclude images from location

$
0
0
So far after several attempts and reading the manuals I am still unable to get a clear and working response to how to exclude a path from ngnix.

Please only reply if you ACTUALLY KNOW what you're doing, no online trolls or bullies, not references to someone else, I took the time to type this so can you.
The answer to this is probably a single line so please be respectful, people read what you put on the internet.

location /path/prefix {
#no entries
}
location ~* \.(png|gif)$ {
expires 30d;
}

I've tried the various ways to do this and none appear to work.
What I want is for images under /path/prefix to go through apache(where I've got rewrite working) every time so exclude /path/prefix from all nginx caching.

I've tried the # no entries style and that does nothing.
I've tried all these variations and none have worked.

expires off;
expires epoch; (not at the same time as off, obviously.)
proxy_no_cache 1;
proxy_pass http://127.0.0.1:8080
add_header Cache-Control 'no-store, no-cache..."


Thanks.
Jon

Viewing all articles
Browse latest Browse all 4759

Trending Articles