Disable auth for certbot webroot challenge.
This commit is contained in:
parent
a1ee2f85f8
commit
40a91f6d66
4 changed files with 21 additions and 1 deletions
4
docker/build.sh
Executable file
4
docker/build.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker container rm notes-server
|
||||
docker build --no-cache -t notes-server .
|
||||
|
|
@ -6,7 +6,7 @@ docker build --no-cache -t notes-server .
|
|||
# Run the notes-server image.
|
||||
docker run -d \
|
||||
--name notes-server \
|
||||
-v "/var/www/html/notes/hugo/public:/usr/share/nginx/html" \
|
||||
-v "${PWD}/../hugo/public:/usr/share/nginx/html" \
|
||||
-p 42069:80 \
|
||||
notes-server
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,15 @@ server {
|
|||
listen 80 default_server;
|
||||
root "/usr/share/nginx/html";
|
||||
|
||||
error_page 404 404.html;
|
||||
|
||||
location / {
|
||||
auth_basic "Restricted";
|
||||
auth_basic_user_file auth.htpasswd;
|
||||
}
|
||||
|
||||
# Disable authentication for certbot challenge dir.
|
||||
location /.well-known/acme-challenge/ {
|
||||
auth_basic off;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
9
docker/run.sh
Executable file
9
docker/run.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Run the notes-server image.
|
||||
docker run \
|
||||
--name notes-server \
|
||||
-v "${PWD}/../hugo/public:/usr/share/nginx/html" \
|
||||
-p 42069:80 \
|
||||
notes-server
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue