upated binaries with new route53 dns challenge

improved mkuser and own scripts
added a test web and test configuration.
giskard
David Kebler 2020-07-01 07:52:41 -07:00
parent 410fac6cbb
commit 9e0603831e
9 changed files with 47 additions and 14 deletions

Binary file not shown.

Binary file not shown.

21
conf/test.conf Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
(r53) {
tls {
dns route53 {
max_retries 10
}
}
}
(errors) {
handle_errors {
rewrite * /{http.error.status_code}.html
file_server
}
}
https://testweb.kebler.net {
import r53
root * /opt/caddy/testweb
file_server
import errors
}

View File

@ -1,4 +0,0 @@
#!/bin/bash
HOST=${1:-rrock64}
# run as root
sudo rsync -chavzP -e 'ssh -p22 -i /home/david/.ssh/privatekeys/sysadmin.kebler.net' /opt/caddy/ root@${HOST}:/opt/caddy

View File

@ -13,8 +13,8 @@ sudo useradd --system \
--comment "Caddy web server" \
caddy
sudo passwd caddy
sudo usermod -a -G caddy sysadmin
source /opt/caddy/scripts/own
sudo usermod -a -G caddy $USER
sudo chown -R caddy:caddy /opt/caddy
sudo chmod g+rw -R /opt/caddy
cat /etc/passwd | grep caddy
cat /etc/passwd | grep sysadmin

View File

@ -1,4 +1,4 @@
#!/bin/bash
sudo chown caddy:sysadmin -R /opt/caddy/conf
sudo chown caddy:sysadmin /opt/caddy
# reset ownership if need be. Assumes user is in caddy group
sudo chown -R caddy:caddy /opt/caddy
sudo chmod g+rw -R /opt/caddy

View File

@ -1,6 +0,0 @@
#!/bin/bash
# TODO needs work
SERVER="download.kebler.net"
DIR=$(dirname "$(dirname "$(readlink -f "$0")")") || exit
echo Getting updated binary
wget

9
testweb/404.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html><html><head>
<title>Test Web</title>
</head>
<body>
<div>
<h1>Page Not Found 404</h1>
</div>
</body>
</html>

13
testweb/index.html Normal file
View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>Test Web</title>
</head>
<body>
<div>
<h1>Test Web</h1>
</div>
</body>
</html>