ref: 3b2dc0a1e993fab45a8158154dadd6670c486b87
parent: 4732506cc81c04ff31abb35e93cd9357a6650424
author: jrmu <jrmu@cloud9p.org>
date: Sun Sep 22 19:44:16 EDT 2024
Add instructions for how to start rc-httpd
--- /dev/null
+++ b/rc-httpd.ms
@@ -1,0 +1,12 @@
+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