ref: b4bcf0eb52167c6ae599914427dc0a21f6a438f3
parent: 3b2dc0a1e993fab45a8158154dadd6670c486b87
author: jrmu <jrmu@cloud9p.org>
date: Sun Sep 22 20:15:35 EDT 2024
Fix capitaliation of $USER
--- a/rc-httpd.ms
+++ b/rc-httpd.ms
@@ -1,12 +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
+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
+ FS_ROOT=/usr/$user/www/$SERVER_NAME
exec static-or-index
}
cpu% chmod +x /rc/bin/rc-httpd/select-handler