jhttp
View this project on GitHub.
This is my most complete web server so far. It has many useful features, including:
- XML configuration file support
- Virtual hosts
- Multi-threaded client handling
- PHP support (requires
php-cgi
) - Custom error pages
- Host-specific configuration
- Page-specific configuration
- GZIP and Deflate compression support
- Optional directory listing
- Optional symlink following
- HTTP Basic authentication
To do
I have a long way to go before jhttp is comparable to Apache or nginx…
- Make certain features easier to implement in the configuration (e.g. redirection as a specific configuration option rather than just by setting the headers correctly)
- Introduce caching support
- Introduce proxy support
- Handle more authentication methods
- Store credentials as hashes rather than as plaintext in auth files
- Introduce persistent connection support
- Somehow support additional modules (e.g. for Perl support)
- Support config at different levels (i.e. page config overrides host config, which overrides server config)
- Include more configuration defaults
- Read incoming requests as bytes rather than text (to handle binary file submissions)
- Handle all verbs (GET, HEAD, POST, PUT, DELETE, PATCH, OPTIONS, CONNECT, TRACE)
- Make logging a bit more uniform
- Introduce WebSocket support (as module?)
- Provide DOS protection (e.g. rate-limiting)
- Validate request syntax better than right now
- Return more headers
- Fix Content-Length header when using compression
- Handle more configuration errors
- Forward to other servers when load gets high
- Add more configuration options
- Support HTTPS