如何解决为什么文件存在时nginx缓存显示找不到?
我的nginx配置是:
worker_processes auto;
load_module modules/ngx_http_image_filter_module.so;
worker_rlimit_nofile 30000;
events {
worker_connections 1000000;
}
http {
include mime.types;
default_type application/octet-stream;
proxy_cache_path /data/nginx/cache121 levels=1:2 keys_zone=VarCache121:10m max_size=15g inactive=60m use_temp_path=off;
proxy_cache_path /data/nginx/cache122 levels=1:2 keys_zone=VarCache122:10m max_size=15g inactive=60m use_temp_path=off;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
server_tokens off;
gzip on;
server {
listen 443 ssl http2;
listen 80;
server_name s2.x.com;
#access_log off;
ssl_certificate /etc/x.pem;
ssl_certificate_key /etc/x.key;
location / {
proxy_pass http://s2o.x.com;
access_log off;
proxy_cache VarCache121;
proxy_cache_key $proxy_host$request_uri;
proxy_cache_revalidate on;
proxy_cache_min_uses 1;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_background_update on;
proxy_cache_lock on;
proxy_http_version 1.1;
proxy_ignore_headers Vary;
#add_header Access-Control-Allow-Origin '*';
add_header x-Hit $upstream_cache_status;
add_header X-CDN-ID x always;
}
}
}
上游服务器中存在以下文件
http://s2o.x.com/statics/tabl/2019/11/myfile.jpg
但以下地址显示404未找到
http://s2o.x.com/statics/tabl/2019/11/myfile.jpg
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。