quark.1 - quark - quark web server
 (HTM) git clone git://git.suckless.org/quark
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
       quark.1 (3100B)
       ---
            1 .Dd 2020-09-27
            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 p Ar port
           10 .Op Fl h Ar host
           11 .Op Fl u Ar user
           12 .Op Fl g Ar group
           13 .Op Fl s Ar num
           14 .Op Fl t Ar num
           15 .Op Fl d Ar dir
           16 .Op Fl l
           17 .Op Fl i Ar file
           18 .Oo Fl v Ar vhost Oc ...
           19 .Oo Fl m Ar map Oc ...
           20 .Nm
           21 .Fl U Ar file
           22 .Op Fl p Ar port
           23 .Op Fl u Ar user
           24 .Op Fl g Ar group
           25 .Op Fl s Ar num
           26 .Op Fl t Ar num
           27 .Op Fl d Ar dir
           28 .Op Fl l
           29 .Op Fl i Ar file
           30 .Oo Fl v Ar vhost Oc ...
           31 .Oo Fl m Ar map Oc ...
           32 .Sh DESCRIPTION
           33 .Nm
           34 is a simple HTTP GET/HEAD-only web server for static content.
           35 It supports virtual hosts (see
           36 .Fl v ) ,
           37 explicit redirects (see
           38 .Fl m ) ,
           39 directory listings (see
           40 .Fl l ) ,
           41 conditional "If-Modified-Since"-requests (RFC 7232), range requests
           42 (RFC 7233) and well-known URIs (RFC 8615), while refusing to serve
           43 hidden files and directories.
           44 .Sh OPTIONS
           45 .Bl -tag -width Ds
           46 .It Fl d Ar dir
           47 Serve
           48 .Ar dir
           49 after chrooting into it.
           50 The default is ".".
           51 .It Fl g Ar group
           52 Set group ID when dropping privileges, and in socket mode the group of the
           53 socket file, to the ID of
           54 .Ar group .
           55 The default is "nogroup".
           56 .It Fl h Ar host
           57 Use
           58 .Ar host
           59 as the server hostname.
           60 The default is the loopback interface (i.e. localhost).
           61 .It Fl i Ar file
           62 Set
           63 .Ar file
           64 as the directory index.
           65 The default is "index.html".
           66 .It Fl l
           67 Enable directory listing.
           68 .It Fl m Ar map
           69 Add the URI prefix mapping rule specified by
           70 .Ar map ,
           71 which has the form
           72 .Qq Pa from to [chost] ,
           73 where each element is separated with spaces (0x20) that can be
           74 escaped with '\\'.
           75 .Pp
           76 The prefix
           77 .Pa from
           78 of all matching URIs is replaced with
           79 .Pa to ,
           80 optionally limited to the canonical virtual host
           81 .Pa chost .
           82 If no virtual hosts are given,
           83 .Pa chost
           84 is ignored.
           85 .It Fl p Ar port
           86 In host mode, listen on port
           87 .Ar port
           88 for incoming connections.
           89 In socket mode, use
           90 .Ar port
           91 for constructing proper virtual host
           92 redirects on non-standard ports.
           93 .It Fl U Ar file
           94 Create the UNIX-domain socket
           95 .Ar file ,
           96 listen on it for incoming connections and remove it on exit.
           97 .It Fl s Ar num
           98 Set the number of connection slots per worker thread to
           99 .Ar num .
          100 The default is 64.
          101 .It Fl t Ar num
          102 Set the number of worker threads to
          103 .Ar num .
          104 The default is 4.
          105 .It Fl u Ar user
          106 Set user ID when dropping privileges,
          107 and in socket mode the user of the socket file,
          108 to the ID of
          109 .Ar user .
          110 The default is "nobody".
          111 .It Fl v Ar vhost
          112 Add the virtual host specified by
          113 .Ar vhost ,
          114 which has the form
          115 .Qq Pa chost regex dir [prefix] ,
          116 where each element is separated with spaces (0x20) that can be
          117 escaped with '\\'.
          118 .Pp
          119 A request matching the virtual host regular expression
          120 .Pa regex
          121 (see
          122 .Xr regex 3 )
          123 is redirected to the canonical host
          124 .Pa chost ,
          125 if they differ, using the directory
          126 .Pa dir
          127 as the root directory, optionally prefixing the URI with
          128 .Pa prefix .
          129 If any virtual hosts are specified, all requests on non-matching
          130 hosts are discarded.
          131 .El
          132 .Sh CUSTOMIZATION
          133 .Nm
          134 can be customized by creating a custom config.h from config.def.h and
          135 (re)compiling the source code. This keeps it fast, secure and simple.
          136 .Sh AUTHORS
          137 .An Laslo Hunhold Aq Mt dev@frign.de