Think Tank Workspaces

httpd-rc

setup rc-httpd quick

touch /rc/bin/rc-httpd/select-handler
#!/bin/rc
PATH_INFO=$location
switch($SERVER_NAME) {
case 172.27.0.67
	FS_ROOT=/usr/glenda/www/yoda
	exec static-or-index
case*
	error 503
}
touch /usr/glenda/www/yoda/index.html
touch /sys/doc/www
chgrp sys /sys/doc/www
chmod +aw www
mv /rc/bin/service/!tcp80 /rc/bin/service/tcp80

minimal config tcp80 service

This was posted to 9fron list server and I found it very interesting.

; cat >/bin/service/tcp80 <<.
#!/bin/rc
exec echo 'HTTP/1.1 200 OK
Content-type: text/html; charset=utf-8

<p>minimal configuration</p>'
.
; chmod +x /bin/service/tcp80

This is something I might want to experiment with in the future


To post a comment you need to login first.