0ce86bba15
Roughly 700 LOC (half of the old quark on the Hiltjo branch) in size, this rewrite supports partial content and other good stuff that will make it fun again to use quark for simple static purposes. The error checking is rigorous and strict and it will report proper error codes back to the client whenever there was a problem or the request was invalid in some way. A cool feature is the support for listening on a UNIX-domain socket, which will in the long run allow us to solve problems with virtual hosts and other things in separate programs. But until then, this should be robust enough for most use-cases. This resets quark's version to 0, but this was no problem as there haven't been any quark releases yet. Feedback is appreciated.
56 lines
1,018 B
Groff
56 lines
1,018 B
Groff
.Dd 2016-09-02
|
|
.Dt QUARK 1
|
|
.Sh NAME
|
|
.Nm quark
|
|
.Nd simple web server
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl v
|
|
.Oo
|
|
.Oo
|
|
.Op Fl h Ar host
|
|
.Op Fl p Ar port
|
|
.Oc
|
|
|
|
|
.Op Fl U Ar udsocket
|
|
.Oc
|
|
.Op Fl d Ar dir
|
|
.Op Fl u Ar user
|
|
.Op Fl g Ar group
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
is a simple HTTP GET only web server that can be multiplexed using
|
|
UNIX-domain sockets.
|
|
.Sh OPTIONS
|
|
.Bl -tag -width Ds
|
|
.It Fl d Ar dir
|
|
Serve
|
|
.Ar dir
|
|
after chrooting into it.
|
|
.It Fl g Ar group
|
|
Set group ID to the ID of
|
|
.Ar group
|
|
when dropping privileges.
|
|
.It Fl h Ar host
|
|
Use
|
|
.Ar host
|
|
as the server hostname.
|
|
.It Fl p Ar port
|
|
Listen on port
|
|
.Ar port
|
|
for incoming connections.
|
|
.It Fl u Ar user
|
|
Set user ID to the ID of
|
|
.Ar user
|
|
when dropping privileges.
|
|
.It Fl U Ar udsocket
|
|
Create the UNIX-domain socket
|
|
.Ar udsocket
|
|
and listen on it for incoming connections.
|
|
.It Fl v
|
|
Print version information to stdout and exit.
|
|
.El
|
|
.Sh CUSTOMIZATION
|
|
.Nm
|
|
can be customized by creating a custom config.h from config.def.h and
|
|
(re)compiling the source code. This keeps it fast, secure and simple.
|