Search notes:

althttpd

Getting (cloning) the sources

$ fossil clone https://sqlite.org/althttpd
The clone operation has cloned the repo into althttpd.fossil and opened it into the directory althttpd:
$ ls -1AF
althttpd/
althttpd.fossil
althttpd.fossil is a SQLite database:
$ file althttpd.fossil
althttpd.fossil: SQLite 3.x database (Fossil repository), last written using SQLite version 3046000

Building the sources

In the opened repository, running make creates althttpd and althttpsd, the webserver without and with SSL support:
$ cd althttpd
$ make
cc -o mkversion mkversion.c
./mkversion manifest.uuid manifest VERSION >VERSION.h
cc -Os -Wall -Wextra -I. -o althttpd althttpd.c
cc -Os -Wall -Wextra -I. -fPIC -o althttpsd -DENABLE_TLS althttpd.c -lssl -lcrypto

Running the webserver

althttpd

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

althttpsd

$ sudo ./althttpsd --port 443 --user rene

Misc

Unfortunately, it seems that althttpd operates in no-blocking mode, i. e. it tries to accept() incoming connections in a loop.

See also

Web servers

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/web/webs...', 1758199680, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/web/webserver/althttpd(77): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78