wm: doc

ref: 318ee44371ddef714ad3798b165285b360302e2d
dir: /rc-httpd.ms/

View raw version
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