From ba19bd83c1007e54498ae3c6f84370e3acf527f0 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Mon, 11 Apr 2016 04:36:47 +0200 Subject: [PATCH] now serves /mirrors.txt to support ubuntu mirror:// urls --- mirror/syncubuntu.sh | 6 ++++-- nginx.conf | 17 +++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/mirror/syncubuntu.sh b/mirror/syncubuntu.sh index c3cea04..21dc294 100755 --- a/mirror/syncubuntu.sh +++ b/mirror/syncubuntu.sh @@ -4,6 +4,9 @@ set -x THISDIR="$(cd $(dirname "$BASH_SOURCE") && pwd -P)" DST="/var/mirror" +echo "http://172.17.0.1/ubuntu/" > $DST/mirrors.txt +chmod a+r $DST/mirrors.txt + mkdir -p "$DST/ubuntu" export GNUPGHOME="/etc/debmirror/ubuntu" @@ -21,6 +24,5 @@ debmirror \ --method=http \ $DST/ubuntu -echo "http://172.17.0.1/ubuntu/" > $DST/ubuntu/mirrors.txt -chmod -R a+rX $DST/ubuntu +chmod -R a+rX $DST diff --git a/nginx.conf b/nginx.conf index a9c02ac..d126cb8 100644 --- a/nginx.conf +++ b/nginx.conf @@ -26,20 +26,17 @@ http { server_name _; - root /var/empty; + root /var/mirror; index index.html index.htm; - location /ubuntu/ { - # alias, not root! - # trailing slash important! - alias /var/mirror/ubuntu/; - autoindex on; - } + #location /ubuntu/ { + # # alias, not root! + # # trailing slash important! + # alias /var/mirror/ubuntu/; + # autoindex on; + #} - location / { - deny all; - } } }