garbash-www

archive of ~alex garbash.com page
git clone git://git.alexkarle.com.com/garbash-www
Log | Files | Refs | README | LICENSE

003-httpd.md (814B) [raw]


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