now serves /mirrors.txt to support ubuntu mirror:// urls
This commit is contained in:
parent
ea138e794a
commit
ba19bd83c1
|
@ -4,6 +4,9 @@ set -x
|
||||||
THISDIR="$(cd $(dirname "$BASH_SOURCE") && pwd -P)"
|
THISDIR="$(cd $(dirname "$BASH_SOURCE") && pwd -P)"
|
||||||
DST="/var/mirror"
|
DST="/var/mirror"
|
||||||
|
|
||||||
|
echo "http://172.17.0.1/ubuntu/" > $DST/mirrors.txt
|
||||||
|
chmod a+r $DST/mirrors.txt
|
||||||
|
|
||||||
mkdir -p "$DST/ubuntu"
|
mkdir -p "$DST/ubuntu"
|
||||||
|
|
||||||
export GNUPGHOME="/etc/debmirror/ubuntu"
|
export GNUPGHOME="/etc/debmirror/ubuntu"
|
||||||
|
@ -21,6 +24,5 @@ debmirror \
|
||||||
--method=http \
|
--method=http \
|
||||||
$DST/ubuntu
|
$DST/ubuntu
|
||||||
|
|
||||||
echo "http://172.17.0.1/ubuntu/" > $DST/ubuntu/mirrors.txt
|
|
||||||
|
|
||||||
chmod -R a+rX $DST/ubuntu
|
chmod -R a+rX $DST
|
||||||
|
|
17
nginx.conf
17
nginx.conf
|
@ -26,20 +26,17 @@ http {
|
||||||
|
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
root /var/empty;
|
root /var/mirror;
|
||||||
|
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
|
|
||||||
location /ubuntu/ {
|
#location /ubuntu/ {
|
||||||
# alias, not root!
|
# # alias, not root!
|
||||||
# trailing slash important!
|
# # trailing slash important!
|
||||||
alias /var/mirror/ubuntu/;
|
# alias /var/mirror/ubuntu/;
|
||||||
autoindex on;
|
# autoindex on;
|
||||||
}
|
#}
|
||||||
|
|
||||||
location / {
|
|
||||||
deny all;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue