From ea138e794a288edb219b0d62259f98bf5b1b168a Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Mon, 11 Apr 2016 03:38:47 +0200 Subject: [PATCH] actually works right now --- docker-compose.yml | 1 + nginx.conf | 23 +++++++++++++---------- sources.list | 8 ++++---- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d6040a8..58e6c8f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,7 @@ services: mirror: hostname: mirror image: sneak/ubuntumirror + build: . network_mode: bridge volumes: - "/mnt/scratch/mirror:/var/mirror" diff --git a/nginx.conf b/nginx.conf index b30898a..a9c02ac 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,4 +1,4 @@ -user daemon; +user www-data; worker_processes auto; pid /var/run/nginx.pid; @@ -11,9 +11,12 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; - sendfile on; - keepalive_timeout 10; - gzip on; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + + keepalive_timeout 10; + gzip on; # default, no host name server { @@ -27,16 +30,16 @@ http { index index.html index.htm; - location / { - deny all; - } - location /ubuntu/ { - gzip_static on; - root /var/mirror/ubuntu/; + # alias, not root! + # trailing slash important! + alias /var/mirror/ubuntu/; autoindex on; } + location / { + deny all; + } } } diff --git a/sources.list b/sources.list index 55681a7..a010ec7 100644 --- a/sources.list +++ b/sources.list @@ -1,4 +1,4 @@ -deb http://archive.ubuntu.com/ubuntu trusty main universe -deb http://archive.ubuntu.com/ubuntu trusty-updates main universe -deb http://archive.ubuntu.com/ubuntu trusty-backports main universe -deb http://archive.ubuntu.com/ubuntu trusty-security main universe +deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main universe +deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main universe +deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main universe +deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main universe