e42bb27846
Change the behavior of docroot, which is now used as a prefix path for
all file operations related to static files. And add chrootdir, which is
just the old docroot behavior and allows to control the path into which
quark will chroot.
Not having properly distinct configuration variables for chroot,
document root and CGI root was specially annoying since commit 2822488
which allowed users to retrieve the CGI script or binary by just
guessing its path, since quark was chrooting into docroot before
anything else, and thus the CGI script/binary was in the user accessible
path.
This is implemented by moving the reqbuf buffer in the middle of a
bigger buffer, reqpath. That buffer contains the value of docroot at its
beginning and reqbuf simply points to the first byte after this value.
67 lines
1.2 KiB
Groff
67 lines
1.2 KiB
Groff
.TH QUARK 1 quark\-VERSION
|
|
.SH NAME
|
|
quark \- simple httpd
|
|
.SH SYNOPSIS
|
|
.B quark
|
|
.RB [ \-c ]
|
|
.RB [ \-C
|
|
.IR chrootdir ]
|
|
.RB [ \-d
|
|
.IR cgidir ]
|
|
.RB [ \-e
|
|
.IR cgiscript ]
|
|
.RB [ \-g
|
|
.IR group ]
|
|
.RB [ \-i
|
|
.IR index ]
|
|
.RB [ \-l ]
|
|
.RB [ \-p
|
|
.IR port ]
|
|
.RB [ \-r
|
|
.IR docroot ]
|
|
.RB [ \-s
|
|
.IR server ]
|
|
.RB [ \-u
|
|
.IR user ]
|
|
.RB [ \-v ]
|
|
.SH DESCRIPTION
|
|
Quark is a simple httpd.
|
|
.SH OPTIONS
|
|
.TP
|
|
.B \-c
|
|
enable CGI-mode, disabled by default.
|
|
.TP
|
|
.B \-C " chrootdir"
|
|
chroot into chrootdir, by default ".".
|
|
.TP
|
|
.B \-d " cgidir"
|
|
change directory to cgidir for CGI-mode, by default ".".
|
|
.TP
|
|
.B \-e " cgiscript"
|
|
CGI-script to execute for each request in CGI-mode, by default "/werc.rc".
|
|
.TP
|
|
.B \-g " group"
|
|
change process group to group, by default "nobody".
|
|
.TP
|
|
.B \-i " indexfile"
|
|
index file, by default "index.html".
|
|
.TP
|
|
.B \-l
|
|
enable directory listing, disabled by default.
|
|
.TP
|
|
.B \-p
|
|
listen on port, by default "80".
|
|
.TP
|
|
.B \-r " docroot"
|
|
change directory to docroot for static files, by default ".".
|
|
.TP
|
|
.B \-s " server"
|
|
listen on server, by default "127.0.0.1".
|
|
.TP
|
|
.B \-u " user"
|
|
change process owner to user, by default "nobody".
|
|
.TP
|
|
.B \-v
|
|
show version information.
|
|
.SH BUGS
|
|
Please report them!
|