On Sun, May 05, 2002 at 07:39:42PM -0700, Dan Kegel wrote:
> > We are going to pull it from the kernel.
> Right. If khttpd had been pulled from 2.4.17, I would have
> had weeks of warning that khttpd is unstable; instead, I learned
> only when someone started doing his own stress testing, and I
> have little time to fix it. I say pull it from
> 2.4.19-pre9. Marcello, put it out of its misery asap, please...
> it'd time for khttpd to become a standalone patch again.
Okay, what about the following:
- the below patch remove khttpd from 2.4.19-pre, but lets the
sysctls in so it can compile out-of-tree
- http://verein.lst.de/~hch/khttpd/khttpd-20020506.tar.gz has a tarball
with khttpd as of 2.4.19-pre8, a simple makefile to build it and
a simple patch to allow loading it when CONFIG_IPV6 != m,
Arjan, could you please put it on the official khttpd website if one
still exists.
- for 2.5 the sysctls can go aswell
diff -uNr -Xdontdiff linux-2.4.19-pre8/Documentation/Configure.help linux/Documentation/Configure.help
--- linux-2.4.19-pre8/Documentation/Configure.help Fri May 3 23:02:47 2002
+++ linux/Documentation/Configure.help Mon May 6 13:05:24 2002
@@ -5406,25 +5406,6 @@
say Y to "Kernel/User network link driver" and to "Routing
messages" instead.
-Kernel httpd acceleration
-CONFIG_KHTTPD
- The kernel httpd acceleration daemon (kHTTPd) is a (limited) web
- server built into the kernel. It is limited since it can only serve
- files from the file system and cannot deal with executable content
- such as CGI scripts. Serving files is sped up if you use kHTTPd.
- If kHTTPd is not able to fulfill a request, it can transparently
- pass it through to a user space web server such as apache.
-
- Saying "M" here builds the kHTTPd module; this is NOT enough to have
- a working kHTTPd. For safety reasons, the module has to be activated
- by doing a "echo 1 > /proc/sys/net/khttpd/start" after inserting the
- module.
-
- Before using this, read the README in net/khttpd !
-
- The kHTTPd is experimental. Be careful when using it on a production
- machine. Also note that kHTTPd doesn't support virtual servers yet.
-
The IPX protocol
CONFIG_IPX
This is support for the Novell networking protocol, IPX, commonly
@@ -25233,7 +25214,7 @@
# LocalWords: Unixware cymru Computone IntelliPort Intelliport computone SI sx
# LocalWords: adbmouse DRI DRM dlabs GMX PLCs Applicom fieldbus applicom int
# LocalWords: VWSND eg ESSSOLO CFU CFNR scribed eiconctrl eicon hylafax KFPU
-# LocalWords: EXTRAPREC fpu mainboards KHTTPD kHTTPd khttpd Xcelerator SBNI tw
+# LocalWords: EXTRAPREC fpu mainboards Xcelerator SBNI tw
# LocalWords: LOGIBUSMOUSE Granch granch sbni Raylink NOHIGHMEM Athlon SIM sim
# LocalWords: hpl Tourrilhes DuraLAN starfire Davicom davicom dmfe auk tms tr
# LocalWords: TokenExpress Belkin Peracom eTek DVDs infradead Cxxx Adlib AV ZX
diff -uNr -Xdontdiff linux-2.4.19-pre8/Makefile linux/Makefile
--- linux-2.4.19-pre8/Makefile Fri May 3 23:02:46 2002
+++ linux/Makefile Mon May 6 13:05:36 2002
@@ -214,8 +214,6 @@
drivers/scsi/aic7xxx/aicasm/aicdb.h \
drivers/scsi/aic7xxx/aicasm/y.tab.h \
drivers/scsi/53c700_d.h \
- net/khttpd/make_times_h \
- net/khttpd/times.h \
submenu*
# directories removed with 'make clean'
CLEAN_DIRS = \
diff -uNr -Xdontdiff linux-2.4.19-pre8/include/linux/sysctl.h linux/include/linux/sysctl.h
--- linux-2.4.19-pre8/include/linux/sysctl.h Fri May 3 23:02:46 2002
+++ linux/include/linux/sysctl.h Mon May 6 13:06:25 2002
@@ -487,6 +487,8 @@
};
/* /proc/sys/net/khttpd/ */
+/* khttpd has been removed from the main kernel.
+ please keep this to allow out-of-tree compilation for 2.4. --hch */
enum {
NET_KHTTPD_DOCROOT = 1,
NET_KHTTPD_START = 2,
diff -uNr -Xdontdiff linux-2.4.19-pre8/net/Config.in linux/net/Config.in
--- linux-2.4.19-pre8/net/Config.in Fri May 3 13:36:27 2002
+++ linux/net/Config.in Mon May 6 12:54:18 2002
@@ -26,9 +26,6 @@
source net/ipv6/Config.in
fi
fi
- if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- source net/khttpd/Config.in
- fi
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
bool 'Asynchronous Transfer Mode (ATM) (EXPERIMENTAL)' CONFIG_ATM
diff -uNr -Xdontdiff linux-2.4.19-pre8/net/Makefile linux/net/Makefile
--- linux-2.4.19-pre8/net/Makefile Fri May 3 13:37:42 2002
+++ linux/net/Makefile Mon May 6 12:54:10 2002
@@ -26,7 +26,6 @@
endif
endif
-subdir-$(CONFIG_KHTTPD) += khttpd
subdir-$(CONFIG_PACKET) += packet
subdir-$(CONFIG_NET_SCHED) += sched
subdir-$(CONFIG_BRIDGE) += bridge
diff -uNr -Xdontdiff linux-2.4.19-pre8/net/khttpd/Config.in linux/net/khttpd/Config.in
--- linux-2.4.19-pre8/net/khttpd/Config.in Fri May 3 13:36:06 2002
+++ linux/net/khttpd/Config.in Thu Jan 1 01:00:00 1970
@@ -1,4 +0,0 @@
-#
-# kHTTPd
-#
-tristate ' Kernel httpd acceleration (EXPERIMENTAL)' CONFIG_KHTTPD
diff -uNr -Xdontdiff linux-2.4.19-pre8/net/khttpd/Makefile linux/net/khttpd/Makefile
--- linux-2.4.19-pre8/net/khttpd/Makefile Fri May 3 13:38:44 2002
+++ linux/net/khttpd/Makefile Thu Jan 1 01:00:00 1970
@@ -1,25 +0,0 @@
-#
-# Makefile for kHTTPd
-#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := khttpd.o
-
-obj-m := $(O_TARGET)
-obj-y := main.o accept.o datasending.o logging.o misc.o rfc.o rfc_time.o security.o \
- sockets.o sysctl.o userspace.o waitheaders.o
-
-
-include $(TOPDIR)/Rules.make
-
-rfc_time.o: times.h
-
-make_times_h: make_times_h.c
- $(HOSTCC) $(HOSTCFLAGS) -o make_times_h make_times_h.c
-
-times.h: make_times_h
- ./make_times_h
diff -uNr -Xdontdiff linux-2.4.19-pre8/net/khttpd/README linux/net/khttpd/README
--- linux-2.4.19-pre8/net/khttpd/README Fri May 3 13:35:57 2002
+++ linux/net/khttpd/README Thu Jan 1 01:00:00 1970
@@ -1,224 +0,0 @@
-=====
-
-kHTTPd - Kernel httpd accelerator
-
-(C) 1999 by Arjan van de Ven
-Licensed under the terms of the GNU General Public License
-
-=====
-
-
-1. Introduction
----------------
- kHTTPd is a http-daemon (webserver) for Linux. kHTTPd is different from
- other webservers in that it runs from within the Linux-kernel as a module
- (device-driver).
-
- kHTTPd handles only static (file based) web-pages, and passes all requests
- for non-static information to a regular userspace-webserver such as Apache or
- Zeus. The userspace-daemon doesn't have to be altered in any way.
-
- Static web-pages are not a very complex thing to serve, but these are very
- important nevertheless, since virtually all images are static, and a large
- portion of the html-pages are static also. A "regular" webserver has little
- added value for static pages, it is simply a "copy file to network"-operation.
- This can be done very efficiently from within the Linux-kernel, for example
- the nfs (network file system) daemon performs a similar task and also runs
- in the kernel.
-
- By "accelerating" the simple case within the kernel, userspace daemons can
- do what they are very good at: Generating user-specific, dynamic content.
-
- Note: This document sometimes uses "Apache" instead of "any webserver you
- ever might want to use", just for reasons of readability.
-
-
-2. Quick Start
---------------
-
- 1) compile and load the module
- 2) configure the module in /proc/sys/net/khttpd if needed
- 3) echo 1 > /proc/sys/net/khttpd/start
-
- unloading:
-
- echo 1 > /proc/sys/net/khttpd/stop
- echo 1 > /proc/sys/net/khttpd/unload
- rmmod khttpd
-
-
-
-3. Configuration
-----------------
-
- Modes of operation
- ==================
-
-
- There are two recommended modes of operation:
-
- 1) "Apache" is main webserver, kHTTPd is assistant
- clientport -> 80
- serverport -> 8080 (or whatever)
-
- 2) kHTTPd is main webserver, "Apache" is assistant
- clientport -> 8080 (or whatever)
- serverport -> 80
-
-
- Configuring kHTTPd
- ==================
-
- Before you can start using kHTTPd, you have to configure it. This
- is done through the /proc filesystem, and can thus be done from inside
- a script. Most parameters can only be set when kHTTPd is not active.
-
- The following things need configuration:
-
- 1) The port where kHTTPd should listen for requests
- 2) The port (on "localhost") where "Apache" is listening
- 3) The location of the documents (documentroot)
- 4) The strings that indicate dynamic content (optional)
- [ "cgi-bin" is added by default ]
-
- It is very important that the documentroot for kHTTPd matches the
- documentroot for the userspace-daemon, as kHTTPd might "redirect"
- any request to this userspace-daemon.
-
- A typical script (for the first mode of operation) to do this would
- look like:
-
-#!/bin/sh
-modprobe khttpd
-echo 80 > /proc/sys/net/khttpd/clientport
-echo 8080 > /proc/sys/net/khttpd/serverport
-echo /var/www > /proc/sys/net/khttpd/documentroot
-echo php3 > /proc/sys/net/khttpd/dynamic
-echo shtml > /proc/sys/net/khttpd/dynamic
-echo 1 > /proc/sys/net/khttpd/start
-
- For the second mode of operation, this would be:
-
-#!/bin/sh
-modprobe khttpd
-echo 8080 > /proc/sys/net/khttpd/clientport
-echo 80 > /proc/sys/net/khttpd/serverport
-echo /var/www > /proc/sys/net/khttpd/documentroot
-echo php3 > /proc/sys/net/khttpd/dynamic
-echo shtml > /proc/sys/net/khttpd/dynamic
-echo 1 > /proc/sys/net/khttpd/start
-
- In this case, you also have to change the configuration of the
- userspace-daemon. For Apache, you do this by changing
-
- Port 80
-
- to
-
- Port 8080
-
-
-
- Stopping kHTTPd
- ===============
- In order to change the configuration, you should stop kHTTPd by typing
- echo 1 > /proc/sys/net/khttpd/stop
- on a command-prompt.
-
- If you want to unload the module,
...
read more »