# wl **Repository Path**: lfs-org/wl ## Basic Information - **Project Name**: wl - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-10-18 - **Last Updated**: 2026-02-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README log_format cachelog '$remote_addr - $http_host [$time_local] ' 'request_time=$request_time upstream_time=$upstream_response_time ' 'cache_key="$uri/$http_accept_encoding" ' 'cache_status=$upstream_cache_status \t' '$status $proxy_host "$request" $body_bytes_sent'; access_log /dev/stdout cachelog buffer=64k flush=1s; # Log to file, can be useful for dev # access_log /var/log/nginx/cache.log pypi_cache buffer=64k flush=1s; # Cache 500G worth of packages for up to 1 month proxy_cache_path /var/lib/nginx/pypi levels=1:2 keys_zone=pypi:16m inactive=1M max_size=500G use_temp_path=off; # Having the same upstream server listed twice allegedly forces nginx to retry # connections and not fail the request immediately. server { listen 80 default_server; proxy_cache pypi; proxy_cache_key $uri/$http_accept_encoding; proxy_cache_lock on; proxy_cache_lock_age 5m; proxy_cache_lock_timeout 5m; proxy_cache_revalidate on; proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; proxy_http_version 1.1; proxy_ssl_server_name on; # sub_filter can't apply to gzipped content, so be careful about that add_header X-Pypi-Cache $upstream_cache_status; sub_filter 'https://repo.huaweicloud.com' $scheme://$http_host; sub_filter 'https://repo.huaweicloud.com/repository/pypi/packages' $scheme://$http_host/pypi/packages; sub_filter_once off; sub_filter_types application/vnd.pypi.simple.v1+json application/vnd.pypi.simple.v1+html; location / { proxy_set_header Connection ""; proxy_set_header Accept-Encoding ""; proxy_cache_valid 200 301 4h; proxy_cache_valid 404 1m; proxy_set_header Host repo.huaweicloud.com; proxy_ssl_name repo.huaweicloud.com; proxy_ssl_verify off; proxy_ssl_protocols TLSv1.2; proxy_pass 'https://repo.huaweicloud.com/repository/'; proxy_redirect 'https://repo.huaweicloud.com' $scheme://$http_host; } location ^~ /simple { proxy_set_header Connection ""; proxy_set_header Accept-Encoding ""; proxy_cache_valid 200 301 10m; proxy_cache_valid 404 1m; proxy_set_header Host repo.huaweicloud.com; proxy_ssl_name repo.huaweicloud.com; proxy_ssl_verify off; proxy_ssl_protocols TLSv1.2; proxy_pass 'https://repo.huaweicloud.com/repository/'; proxy_redirect 'https://repo.huaweicloud.com' $scheme://$http_host; } location ^~ /packages { proxy_set_header Connection ""; proxy_set_header Accept-Encoding ""; proxy_cache_valid 200 301 1M; proxy_cache_valid 404 1m; proxy_set_header Host repo.huaweicloud.com; proxy_ssl_name repo.huaweicloud.com; proxy_ssl_verify off; proxy_ssl_protocols TLSv1.2; proxy_pass 'https://repo.huaweicloud.com/repository/'; proxy_redirect 'https://repo.huaweicloud.com' $scheme://$http_host; } location /nginx_status { stub_status; } } include conf.d/*.conf; }