1 rws - a fast, small and efficient web server written in C
2 written by Richard Jones <rich@annexia.org>
7 ``rws'' is yet another web server. This one offers the advantage
8 that it is both cleanly written internally, as well as simple,
9 and, of course, very fast. Current features include:
12 * Memory-mapped file cache.
13 * Serves directory listings.
14 * Supports virtual hosts.
16 * CGI scripts (NPH scripts only).
17 * Shared object scripts (see below).
18 * Access and error logs.
20 The following are the features that I intend to add before I
21 declare that ``rws'' is complete:
23 * Run CGI scripts as a local user (similar to Apache suexec).
24 * IP-based access control.
27 INSTALLATION INSTRUCTIONS
28 -------------------------
30 You must install c2lib and pthrlib libraries first. Get these
33 c2lib http://www.annexia.org/freeware/c2lib/
34 pthrlib http://www.annexia.org/freeware/pthrlib/
36 If you are having problems with ``rws'', make sure that you
37 have the latest versions of these libraries installed before
38 reporting any errors to me.
42 ./configure --sysconfdir=/etc [--prefix=/usr]
50 As configured above the server installs itself as
51 /usr/local/sbin/rwsd, and expects to find configuration files in the
52 /etc/rws directory (unless you specify different --prefix and
53 --sysconfdir parameters).
55 Edit /etc/rws/rws.conf (which is the global level configuration file)
56 as appropriate for your site.
58 Edit /etc/rws/hosts/default to configure as required. Note that by
59 default, the document root is set to /usr/local/share/rws/html, which
60 just contains a demo page.
62 Start up the web server:
66 These are early days. If you find a bug, please report it to me
67 by mailing rich@annexia.org. Please include a complete description.
72 1. The web server seems to have loads of memory leaks! It just sits
73 there sucking up more and more memory.
75 A. Not so. The web server stores a cache of memory mapped files,
76 making it quicker to serve the same file subsequent times.
77 Unfortunately top(1) or ps(1) count the memory mapped files
78 against the size of the process, even though they are never
79 really loaded into memory. To get a real picture of what's
80 going on, look at /proc/<<PID>>/maps and /proc/<<PID>>/fd/
81 (replace <<PID>> with the process ID of ``rws'').
83 2. What's all this about shared object scripts and .so files?
87 3. Can I run rws under Apache?
89 A. Yes, using mod_proxy. More instructions to come, but this is the
90 recommended approach if you want to integrate monolith applications
91 with your existing Apache-driven site.