Warning this is khttpd without a second httpd as backend, it may or may not work.
If you see this page when typing links -g http://localhost/test.htm khttpd is up and running>
khtppd has to be activated by the SPB-Linux parameter: net:khttpd=yes
Unloading kHTTPd
===============
To unload the module, do
echo 1 > /proc/sys/net/khttpd/stop
echo 1 > /proc/sys/net/khttpd/unload
#killall -HUP khttpd
sleep 2
rmmod khttpd
If this doesn't work fast enough for you (unloading can wait for
a remote connection to close down), you can send the daemons a "HUP"
signal after you told them to stop. This will cause the daemon-threads to
stop immediately.
kHTTPd only serves a file if
1) There is no "?" in the URL
2) The URL starts with a "/"
3) The file indicated by the URL exists
4) The file is world-readable (*)
5) The file is not a directory, executable or has the Sticky-bit
set (*)
6) The URL doesn't contain any "forbidden" substrings such as ".."
and "cgi-bin" (*)
7) The mime-type is known (*)
The following parameters are settable through /proc/sys/net/khttpd:
Name Default Description
serverport 8080 The port where kHTTPd listens on
clientport 80 The port of the userspace
http-daemon
threads 2 The number of server-threads. Should
be 1 per CPU for small websites, 2
per CPU for big (the active files
do not fit in the RAM) websites.
documentroot /var/www the directory where the
document-files are
start 0 Set to 1 to start kHTTPd
(this also resets "stop" to 0)
stop 0 Set to 1 to stop kHTTPd
(this also resets "start" to 0)
unload 0 Set to 1 to prepare kHTTPd for
unloading of the module
sloppymime 0 If set to 1, unknown mime-types are
set to text/html. If set to 0,
files with unknown mime-types are
handled by the userspace daemon
perm_required S_IROTH Minimum permissions required
(for values see "man 2 stat")
perm_forbid dir+sticky+ Permission-mask with "forbidden"
execute permissions.
(for values see "man 2 stat")
dynamic cgi-bin .. Strings that, if they are a subset
of the URL, indicate "dynamic
content"
maxconnect 1000 Maximum number of concurrent
connections