ref: 0c75dd8ccc21d4409013536e6bde2a12a7a3493f
dir: /rc-httpd.ms/
cpu% cp (/bin/service/)^(!tcp80 tcp80) cpu% mkdir -p /usr/$user/www/example.com cpu% echo "Hello, world!" > /usr/$user/www/example.com/index.html Put this in /rc/bin/rc-httpd/select-handler: if(~ $SERVER_NAME example.com){ PATH_INFO=$location FS_ROOT=/usr/$user/www/$SERVER_NAME 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