quark

quark web server
git clone git://git.suckless.org/quark
Log | Files | Refs | LICENSE

quark.1 (2646B)


      1 .Dd 2019-02-24
      2 .Dt QUARK 1
      3 .Os suckless.org
      4 .Sh NAME
      5 .Nm quark
      6 .Nd simple static web server
      7 .Sh SYNOPSIS
      8 .Nm
      9 .Fl h Ar host
     10 .Fl p Ar port
     11 .Op Fl u Ar user
     12 .Op Fl g Ar group
     13 .Op Fl n Ar num
     14 .Op Fl d Ar dir
     15 .Op Fl l
     16 .Op Fl i Ar file
     17 .Oo Fl v Ar vhost Oc ...
     18 .Oo Fl m Ar map Oc ...
     19 .Nm
     20 .Fl U Ar file
     21 .Op Fl p Ar port
     22 .Op Fl u Ar user
     23 .Op Fl g Ar group
     24 .Op Fl n Ar num
     25 .Op Fl d Ar dir
     26 .Op Fl l
     27 .Op Fl i Ar file
     28 .Oo Fl v Ar vhost Oc ...
     29 .Oo Fl m Ar map Oc ...
     30 .Sh DESCRIPTION
     31 .Nm
     32 is a simple HTTP GET/HEAD-only web server for static content.
     33 .Sh OPTIONS
     34 .Bl -tag -width Ds
     35 .It Fl d Ar dir
     36 Serve
     37 .Ar dir
     38 after chrooting into it.
     39 The default is ".".
     40 .It Fl g Ar group
     41 Set group ID when dropping privileges, and in socket mode the group of the
     42 socket file, to the ID of
     43 .Ar group .
     44 The default is "nogroup".
     45 .It Fl h Ar host
     46 Use
     47 .Ar host
     48 as the server hostname.
     49 .It Fl i Ar file
     50 Set
     51 .Ar file
     52 as the directory index.
     53 The default is "index.html".
     54 .It Fl l
     55 Enable directory listing.
     56 .It Fl m Ar map
     57 Add the target prefix mapping rule specified by
     58 .Ar map ,
     59 which has the form
     60 .Qq Pa from to [chost] ,
     61 where each element is separated with spaces (0x20) that can be
     62 escaped with '\\'.
     63 .Pp
     64 The prefix
     65 .Pa from
     66 of all matching targets is replaced with
     67 .Pa to ,
     68 optionally limited to the canonical virtual host
     69 .Pa chost .
     70 If no virtual hosts are given,
     71 .Pa chost
     72 is ignored.
     73 .It Fl n Ar num
     74 Set the maximum number of threads to
     75 .Ar num .
     76 The default is 512.
     77 .It Fl p Ar port
     78 In host mode, listen on port
     79 .Ar port
     80 for incoming connections.
     81 In socket mode, use
     82 .Ar port
     83 for constructing proper virtual host
     84 redirects on non-standard ports.
     85 .It Fl U Ar file
     86 Create the UNIX-domain socket
     87 .Ar file ,
     88 listen on it for incoming connections and remove it on exit.
     89 .It Fl u Ar user
     90 Set user ID when dropping privileges,
     91 and in socket mode the user of the socket file,
     92 to the ID of
     93 .Ar user .
     94 The default is "nobody".
     95 .It Fl v Ar vhost
     96 Add the virtual host specified by
     97 .Ar vhost ,
     98 which has the form
     99 .Qq Pa chost regex dir [prefix] ,
    100 where each element is separated with spaces (0x20) that can be
    101 escaped with '\\'.
    102 .Pp
    103 A request matching the virtual host regular expression
    104 .Pa regex
    105 (see
    106 .Xr regex 3 )
    107 is redirected to the canonical host
    108 .Pa chost ,
    109 if they differ, using the directory
    110 .Pa dir
    111 as the root directory, optionally prefixing the target with
    112 .Pa prefix .
    113 If any virtual hosts are specified, all requests on non-matching
    114 hosts are discarded.
    115 .El
    116 .Sh CUSTOMIZATION
    117 .Nm
    118 can be customized by creating a custom config.h from config.def.h and
    119 (re)compiling the source code. This keeps it fast, secure and simple.
    120 .Sh AUTHORS
    121 .An Laslo Hunhold Aq Mt dev@frign.de