GithubHelp home page GithubHelp logo

rws's Introduction

rws - a fast, small and efficient web server written in C
written by Richard Jones <[email protected]>

GENERAL INFO
------------

``rws'' is yet another web server. This one offers the advantage
that it is both cleanly written internally, as well as simple,
and, of course, very fast. Current features include:

* Serves files.
* Memory-mapped file cache.
* Serves directory listings.
* Supports virtual hosts.
* Supports aliases.
* CGI scripts (NPH scripts only).
* Shared object scripts (see below).
* Access and error logs.

The following are the features that I intend to add before I
declare that ``rws'' is complete:

* Run CGI scripts as a local user (similar to Apache suexec).
* IP-based access control.
* Manual pages.

INSTALLATION INSTRUCTIONS
-------------------------

You must install c2lib and pthrlib libraries first. Get these
from:

	c2lib		http://www.annexia.org/freeware/c2lib/
	pthrlib		http://www.annexia.org/freeware/pthrlib/

If you are having problems with ``rws'', make sure that you
have the latest versions of these libraries installed before
reporting any errors to me.

Build it:

	./configure --sysconfdir=/etc
	make

Install it (as root):

	make install

As configured above the server installs itself as /usr/local/sbin/rwsd,
and expects to find configuration files in the /etc/rws directory.

Create a configuration directory:

	mkdir /etc/rws
	cp example-rws.conf /etc/rws/rws.conf

	mkdir /etc/rws/hosts
	cp example-host /etc/rws/hosts/`hostname`
	cd /etc/rws/hosts
	ln -s `hostname` default

Edit /etc/rws/rws.conf (which is the global level configuration file)
as appropriate for your site.

Edit /etc/rws/hosts/<<HOSTNAME>> (replace <<HOSTNAME>> with the
hostname of your machine). Note that by default, the document root
is set to /tmp, which is probably not what you want :-)

Start up the web server:

	/usr/local/sbin/rwsd

These are early days. If you find a bug, please report it to me
by mailing [email protected]. Please include a complete description.

FAQ
---

1. The web server seems to have loads of memory leaks! It just sits
   there sucking up more and more memory.

   A. Not so. The web server stores a cache of memory mapped files,
      making it quicker to serve the same file subsequent times.
      Unfortunately top(1) or ps(1) count the memory mapped files
      against the size of the process, even though they are never
      really loaded into memory. To get a real picture of what's
      going on, look at /proc/<<PID>>/maps and /proc/<<PID>>/fd/
      (replace <<PID>> with the process ID of ``rws'').

2. What's all this about shared object scripts and .so files?

   A. See doc/index.html

rws's People

Contributors

danlm avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.