-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add caching proxy for libcdb debuginfod files to CI (#2487)
- Loading branch information
1 parent
a3b22b7
commit d225311
Showing
4 changed files
with
124 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
proxy_cache_path /var/cache/nginx keys_zone=my_cache:1m max_size=1g inactive=12w use_temp_path=off; | ||
log_format cache_st '$remote_addr - $remote_user - $upstream_cache_status [$time_local] ' | ||
'"$request" $status $body_bytes_sent ' | ||
'"$http_referer" "$http_user_agent"'; | ||
access_log /dev/stdout cache_st; | ||
|
||
server { | ||
listen 3000; | ||
proxy_cache my_cache; | ||
|
||
location / { | ||
proxy_set_header Host debuginfod.elfutils.org; | ||
proxy_cache_revalidate on; | ||
proxy_cache_key $scheme://$host$uri$is_args$query_string; | ||
proxy_cache_valid 200 404 12w; | ||
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504 http_429; | ||
proxy_pass https://debuginfod.elfutils.org/; | ||
} | ||
} | ||
|
||
server { | ||
listen 3001; | ||
proxy_cache my_cache; | ||
|
||
location / { | ||
proxy_set_header Host libc.rip; | ||
proxy_cache_methods GET HEAD POST; | ||
proxy_cache_revalidate on; | ||
proxy_cache_key $scheme://$host$uri$is_args$query_string$request_body; | ||
proxy_cache_valid 200 404 12w; | ||
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504 http_429; | ||
proxy_pass https://libc.rip/; | ||
} | ||
} | ||
|
||
server { | ||
listen 3002; | ||
proxy_cache my_cache; | ||
|
||
location / { | ||
proxy_set_header Host archive.ubuntu.com; | ||
proxy_cache_revalidate on; | ||
proxy_cache_key $scheme://$host$uri$is_args$query_string; | ||
proxy_cache_valid 200 404 12w; | ||
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504 http_429; | ||
proxy_pass http://archive.ubuntu.com/; | ||
} | ||
} | ||
|
||
server { | ||
listen 3003; | ||
proxy_cache my_cache; | ||
|
||
location / { | ||
proxy_set_header Host gitlab.com; | ||
proxy_ssl_server_name on; | ||
proxy_cache_revalidate on; | ||
proxy_cache_key $scheme://$host$uri$is_args$query_string; | ||
proxy_cache_valid 200 404 12w; | ||
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504 http_429; | ||
proxy_pass https://gitlab.com/; | ||
} | ||
} | ||
} |