diff options
author | Aaron LI <aly@aaronly.me> | 2017-06-16 08:53:11 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-06-16 08:53:11 +0800 |
commit | 30e040eab1abeb078377f973fc5b9651516667a9 (patch) | |
tree | 3fff64b3ed354eaa5daef6d072c86f5dd427329b | |
parent | 0ef861cde7f5da8c3406dfdb0353832db007bf48 (diff) | |
download | debian-hpc-30e040eab1abeb078377f973fc5b9651516667a9.tar.bz2 |
nginx: Rename apt-proxy.site.j2 -> nodes.site.j2, add location /nodes
-rw-r--r-- | roles/nginx/templates/nodes.site.j2 (renamed from roles/nginx/templates/apt-proxy.site.j2) | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/roles/nginx/templates/apt-proxy.site.j2 b/roles/nginx/templates/nodes.site.j2 index 8c19f4c..df6c369 100644 --- a/roles/nginx/templates/apt-proxy.site.j2 +++ b/roles/nginx/templates/nodes.site.j2 @@ -1,18 +1,32 @@ # -# /etc/nginx/sites-available/apt-proxy.site -# Nginx site: apt mirror proxy for LAN nodes +# /etc/nginx/sites-available/nodes.site +# Nginx site: +# * APT mirror proxy for LAN nodes +# * Serve extra files and configurations to nodes # server { listen 80; listen [::]:80; - access_log /var/log/nginx/apt.access.log; - error_log /var/log/nginx/apt.error.log; + access_log /var/log/nginx/nodes.access.log; + error_log /var/log/nginx/nodes.error.log; allow {{ lan_network }}; deny all; + root /srv/www; + index index.html index.htm; + + location /nodes { + # Allow directory listing output + autoindex on; + # Round file sizes kB, MB, GB + autoindex_exact_size off; + # Show times in local time zone + autoindex_localtime on; + } + location /debian/ { try_files $uri @mirror; } |