Skip to content

Instantly share code, notes, and snippets.

@lae
Created March 30, 2018 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lae/d576fc0f7b3c815758b84b533c42f0e1 to your computer and use it in GitHub Desktop.
Save lae/d576fc0f7b3c815758b84b533c42f0e1 to your computer and use it in GitHub Desktop.
--- /etc/nginx/sites-available/packages_mirror 2018-03-30 09:55:29.836239288 -0700
+++ /etc/nginx/sites-available/packages_mirror.new 2018-03-30 11:03:52.840386023 -0700
@@ -39,7 +39,12 @@
# location /uploads/ {
# proxy_pass https://up.lae.is/u/;
# }
- location ~ ^/(fedora-epel|ubuntu|ubuntu-releases)/ {
+ location ~ ^/fedora-epel/ {
+ resolver 10.11.10.11;
+ set $mirror "http://mirrors.kernel.org:80";
+ proxy_pass $mirror;
+ }
+ location ~ ^/ubuntu(|-releases)/ {
resolver 10.11.10.11;
set $mirror "http://us.archive.ubuntu.com:80";
proxy_pass $mirror;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment