Althttpd

From Alpine Linux
Revision as of 23:10, 13 April 2025 by Sodface (talk | contribs) (Created page with "From the [https://sqlite.org/althttpd/doc/trunk/althttpd.md althttpd home page]: Althttpd is a simple web-server that has run the https://sqlite.org/ website, among others, since 2004. Althttpd strives for simplicity, security, and low resource usage. == Features == * Virtual Hosts * Brotli and GZip content compression * Request URIs sanitized for security * Basic authentication * Client IP blocking * CGI/SCGI support * TLS support * Runs in chroot jail by default *...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

From the althttpd home page:

Althttpd is a simple web-server that has run the https://sqlite.org/ website, among others, since 2004. Althttpd strives for simplicity, security, and low resource usage.

Features

  • Virtual Hosts
  • Brotli and GZip content compression
  • Request URIs sanitized for security
  • Basic authentication
  • Client IP blocking
  • CGI/SCGI support
  • TLS support
  • Runs in chroot jail by default
  • Files or directories beginning with . or - are ignored
  • and more ...

Quick Start

# apk add althttpd

In a working directory, create a test index.html file:

Contents of index.html

<!DOCTYPE html> <html> <head> <title>Hello World!</title> </head> <body> <h1>Hello, World!</h1> </body> </html>

From the working directory, start althttpd:

~/althttpd-wiki $ althttpd .
Listening for HTTP requests on TCP port 8080

Open up your browser and navigate to http://127.0.0.1:8080 and you should see your Hello World! page.

Running as a Service

Install the openrc service scripts:

# apk add althttpd-openrc

Review the startup options documented in /etc/conf.d/althttpd and edit $ALTHTTPD_OPTS as required for your environment.

Use the rc-service command as usual to start|stop|restart althttpd:

# rc-service althttpd start
# rc-service althttpd restart
# rc-service althttpd stop

See Also

The althttpd home page