我在 Debian 9 上运行 nginx 服务器,以便为我的 S3 存储桶节省一些带宽。它目前保存着 300GB 的数据。为了省钱,我想将这些数据移动到另一台服务器。我目前正在将 nginx 缓存文件复制到新服务器,但我认为这行不通。有没有关于如何设置我的服务器配置的想法,以便缓存文件不会到达 S3 存储桶?我目前的想法是这样做:[新服务器] -> [旧服务器] -> S3。这是我的旧服务器 nginx 配置:
proxy_cache s3_cache;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Authorization '';
proxy_set_header Host static.xxxxxxxxxxx.com.s3-website-us-east-1.amazonaws.com;
proxy_hide_header x-amz-id-2;
proxy_hide_header x-amz-request-id;
proxy_hide_header x-amz-meta-server-side-encryption;
proxy_hide_header x-amz-server-side-encryption;
proxy_hide_header Set-Cookie;
proxy_ignore_headers Set-Cookie;
proxy_cache_revalidate on;
proxy_intercept_errors on;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_lock on;
proxy_cache_valid 200 304 60m;
add_header Cache-Control max-age=31536000;
add_header X-Cache-Status $upstream_cache_status;
proxy_pass http://static.xxxxxxxxxxxxx.com.s3-website-us-east-1.amazonaws.com/;