mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #389] Disabling caching #330
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#330
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Laizrod on GitHub (May 1, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/389
Hi. I don't even know if this is an actual issue, but I'm facing a caching problem with one of my websites (running Apache).
After investigations, I found out that nginx cache was causing my problem. I tried a lot of things I've googled, but nothing worked.
Could you please tell me how to disable nginx cache on a specific proxy host?
Thank you
@mrneutron42 commented on GitHub (Aug 9, 2021):
I'm having the same problem. I think we found a bug.

It looks like Cache Assets control does not work in the GUI.
When you disable Cache Assets button, the caching does not stop, as you would expect.
From reading these:
https://stackoverflow.com/questions/54136265/nginx-reverse-proxy-disable-cache
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache
It was my understanding that he have to put the following into our proxy_host conf files:
proxy_no_cache 1;
proxy_cache_bypass 1;
then
proxy_cache off;
I think it goes in the "location / {" section of: ~nginxproxymanager/data/nginx/proxy_host/1.conf
After adding these lines, I restarted.
@chaptergy commented on GitHub (Aug 9, 2021):
I think you misunderstand the cache assets toggle. All it does is specifically cache css / js / image files by including this nginx config.
The cache should be disabled by default I think. But just to make sure you can just add the three lines you have mentioned to the advanced config tab:
@mrneutron42 commented on GitHub (Aug 9, 2021):
No, the default is clearly proxy_cache on, which is why we were trying to find a way to turn it off.
I've got a webcam image on a weather station webserver. The webcam image got cached by NGINX and the same image was repeated (not refreshed) with each refresh of the web page.
Adding the 3 conf file lines I mentioned, stopped the caching and the webcam image now updates, with each page refresh, as desired.
@chaptergy commented on GitHub (Aug 9, 2021):
Weird, I'm not sure why it should be activated, since the only config contained in npm seems to be to switch it off. But glad it works.
@mrneutron42 commented on GitHub (Aug 9, 2021):
Do you think it would be difficult to add switch to the GUI to turn off the cache?
That would be a nice feature to have!
Should I make a feature request?
@chaptergy commented on GitHub (Aug 9, 2021):
Sure, go ahead