003-httpd.txt (790B) [raw]
1 # 003-httpd 2 3 _Tues Sept 21, 2021_ 4 5 One of the first things I do when I set up a machine is set up 6 httpd(8) and grab a HTTPS cert via acme-client(8). 7 8 Here's a quick rundown (though reading the man pages is worth 9 the time!). 10 11 # sed 's/example.com/garbash.com/g' \ 12 /etc/examples/httpd.conf > /etc/httpd.conf 13 # sed 's/example.com/garbash.com/g' \ 14 /etc/examples/acme-client.conf > /etc/acme-client.conf 15 16 Then go in and edit the files to add aliases if needed! 17 18 To get the certs for the first time: 19 20 # rcctl enable httpd 21 # rcctl start httpd 22 # acme-client -v garbash.com # get certs 23 # rcctl reload httpd # load certs 24 25 Finally, to keep the certs up to date, add the following to the 26 crontab: 27 28 # crontab -e 29 ... 30 ~ * * * * acme-client garbash.com && rcctl reload httpd