wm: doc

Download patch

ref: 0c75dd8ccc21d4409013536e6bde2a12a7a3493f
parent: 318ee44371ddef714ad3798b165285b360302e2d
author: jrmu <jrmu@cloud9p.org>
date: Mon Sep 23 02:56:59 EDT 2024

Added steps for TLS

--- a/rc-httpd.ms
+++ b/rc-httpd.ms
@@ -10,3 +10,25 @@
      exec static-or-index
 }
 cpu% chmod +x /rc/bin/rc-httpd/select-handler
+
+
+To have TLS:
+
+cpu% cp (/bin/service/)^(!tcp80 tcp443)
+
+Inside /bin/service/tcp443:
+
+#!/bin/rc
+exec tlssrv -c /sys/lib/tls/acmed/example.com.crt -r`{cat $3/remote} /rc/bin/rc-httpd/rc-httpd >>[2]/sys/log/www
+
+chmod +x /bin/service/tcp443
+
+Stick the private key into secstore's factotum:
+
+cpu% ramfs -p; cd /tmp
+% auth/secstore -g factotum
+secstore password:
+% cat /sys/lib/tls/acmed/example.com.key >> factotum
+% auth/secstore -v -p factotum
+secstore password:
+% read -m factotum > /mnt/factotum/ctl