For an HTTP server which makes use of modern Emacs network process handling see [https://github.com/eschulte/emacs-web-server Web Server] which requires Emacs 24.3 or greater but has no other dependencies.  Web-server supports the full range of HTTP GET and POST requests, and web sockets.  The info manual including usage examples is available online at [http://eschulte.github.io/emacs-web-server/index.html#Top manual].

----

Emacs 23 supports server sockets and asynchronous server sockets. [[Elnode]] is an asychronous http server in elisp by NicFerrier.

The async approach has several benefits:

* emacs can use an external program (asynchronously of course) to do things
** Elnode uses cat as part of its webserver
* writing dynamic handlers is relatively easy
* it could serve as the foundation for many different services, [[Edit_with_Emacs]] (the Chrome browser edit tool) needs an Emacs http server
* the async approach doesn't require threads to serve quite high loads

----

Below are two older approaches.

----

httpd.el was originally written by EricMarsden. See EmacsHttpd for the original.

JohnWiegley posted version 1.0 as:
: <em>2003-11-14 (1.0): This customized version of [ftp://ftp.newartisans.com:/pub/emacs/httpd.el httpd.el] is always current, plus whatever other modifications emacs-wiki.el or httpd-serve need.</em>


httpd.el is an HTTP server embedded in the Emacs. It supports GET and HEAD requests for static and dynamic content. (supporting POST should be easy by stealing code from CommonGatewayInterface above).

Note the following if you use Emacs version 21.4 or lower: Since Emacs doesn't support server sockets, you need to cheat a little and run it from a service such as tcpserver or inetd. You can get better performance by running a proxy server which forwards requests to a persistent emacs instance using gnuserv; see the commentary for details. Version 0.4, 2001-05-17 under GNU GPL.

----

[http://synthcode.com/emacs/ phase.el] is an HTTP server by AlexShinn under development, with cgi functionality and the ability to parse emacs lisp embedded in html documents.

----

The first one above does not work for emacs23, and the second one redirects to a blank page.

Here's one that I am using now - http://nullprogram.com/blog/2009/05/17/

----

CommonGatewayInterface EricMarsden EmacsHttpd
