From a0b37487e9b95067a951e1c68d0e8af6946ae604 Mon Sep 17 00:00:00 2001 From: Marius Date: Fri, 4 Nov 2016 19:51:39 +0100 Subject: [PATCH] Add public directory --- .infra/Freyfile.hcl | 4 ++++ .infra/files/nginx.conf | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/.infra/Freyfile.hcl b/.infra/Freyfile.hcl index a1cb1cf..0658e0e 100644 --- a/.infra/Freyfile.hcl +++ b/.infra/Freyfile.hcl @@ -180,6 +180,10 @@ setup { name = "nginx | Add nginx PPA" apt_repository = "repo='ppa:nginx/stable'" } + tasks { + name = "nginx | Create public www directory" + file = "path=/mnt/nginx-www state=directory owner=www-data group=ubuntu mode=ug+rwX,o= recurse=yes" + } } } diff --git a/.infra/files/nginx.conf b/.infra/files/nginx.conf index c2e6e26..d9aaf7f 100644 --- a/.infra/files/nginx.conf +++ b/.infra/files/nginx.conf @@ -4,6 +4,13 @@ server { server_name master.tus.io; + # certbot will place the files required for the HTTP challenge in the + # webroot under the .well-known/acme-challenge directory. Therefore we must + # make this path publicly accessible. + location /.well-known { + root /mnt/nginx-www/; + } + location / { # Forward incoming requests to local tusd instance proxy_pass http://localhost:8080;