The mohws package

[Tags:bsd3, library, program]

A web server with a module system and support for CGI. Based on Simon Marlow's original Haskell Web Server.

[Skip to Readme]


Versions 0.1, 0.2,, 0.2.1,,,,,
Dependencies base (>3), bytestring, containers, data-accessor (==0.2.*), directory, explicit-exception (==0.1.*), filepath, ghc (==6.8.*), html, HTTP (>=4000.0.4 && <4001), network, old-locale, old-time, parsec, process, transformers (>=0.1.3 && <0.2), unix, utility-ht (>=0.0.3 && <0.1) [details]
License BSD3
Copyright Simon Marlow, Bjorn Bringert
Author Simon Marlow, Bjorn Bringert <>
Maintainer Henning Thielemann <>
Stability Unknown
Category Web
Home page
Uploaded Mon Apr 6 00:49:37 UTC 2009 by HenningThielemann
Distributions NixOS:
Downloads 1327 total (18 in the last 30 days)
0 []
Status Docs not available [build log]
All reported builds failed as of 2015-11-23 [all 4 reports]


  • Network
    • MoHWS
      • Network.MoHWS.Configuration
        • Network.MoHWS.Configuration.Accessor
        • Network.MoHWS.Configuration.Parser
      • HTTP
        • Network.MoHWS.HTTP.Header
        • Network.MoHWS.HTTP.MimeType
        • Network.MoHWS.HTTP.Request
        • Network.MoHWS.HTTP.Response
        • Network.MoHWS.HTTP.Version
      • Network.MoHWS.Initialization
        • Network.MoHWS.Initialization.Standard
      • Network.MoHWS.Logger
        • Network.MoHWS.Logger.Access
        • Network.MoHWS.Logger.Error
        • Network.MoHWS.Logger.Level
      • Network.MoHWS.Module
        • Network.MoHWS.Module.Description
      • Part
        • Network.MoHWS.Part.AddSlash
        • Network.MoHWS.Part.CGI
        • Network.MoHWS.Part.File
        • Network.MoHWS.Part.Index
        • Network.MoHWS.Part.Listing
        • Network.MoHWS.Part.UserDirectory
        • Network.MoHWS.Part.VirtualHost
      • Network.MoHWS.Server
        • Network.MoHWS.Server.Context
        • Network.MoHWS.Server.Options
        • Network.MoHWS.Server.Request
      • Network.MoHWS.Stream


Maintainer's Corner

For package maintainers and hackage trustees

Readme for mohws

Readme for mohws-0.2

This is a web server written in Haskell, based on Simon Marlow's original
Haskell Web Server. It has a module system and can run CGI programs. 

The original program is described in:
Developing a high-performance web server in Concurrent Haskell,
Simon Marlow, 
Journal of Functional Programming, 12(4+5):359--374, July 2002

The original version available from:

A more conservative update of the original HWS is available from:

=== Build ===

You can use either Cabal or make to build HWS.

==== With Cabal ====

$ runghc Setup.hs configure
$ runghc Setup.hs build

This produces the binary ``dist/build/hws/hws``.

==== With make ====

$ make

This produces the binary ``./hws``.

=== Configure ===

There is a config file example in ``conf/httpd.conf``. The server should run with the 
example settings, but it would not be very usable. See the example file
for more information about the configuration parameters.

=== Run ===

usage: hws [option...]
  -f filename   --config=filename        default: "conf/httpd.conf"
  -d directory  --server-root=directory  default: "."

The server root is the directory which hws uses as base for the
configuration and log file paths.

Files are served from the DocumentRoot.

==== CGI ====

Files which have the filename suffix ``.cgi`` are run as CGI programs.

==== Debug ====

Look in the error log file (``log/error.log`` by default) for any error messages.
If this does not help, try setting LogLevel to debug (in the config file).