how to clear the docker nginx file cache
I have a nginx running in docker as a static server. When I update the server side folder template.xlsx
file. the download still return the old file, I am sure I have replace the static template.xlsx
file to a new one. how to make the nginx return the new nginx file? this is the static nginx config:
server{
listen 443 ssl;
ssl_certificate /etc/nginx/conf.d/cert/example.com/fullchain1.pem;
ssl_certificate_key /etc/nginx/conf.d/cert/example.com/privkey1.pem;
server_name static.example.com;
location / {
root /usr/share/nginx/html/static;
client_max_body_size 50m;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
index index.html index.htm;
}
}
I tried to restart the docker container seems still did not return the new template.
Read more here: Source link