summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-04-23 13:48:42 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-04-23 13:48:42 +0300
commit822cc3f646945d95ef00b96e881aa67f97b1d7a2 (patch)
tree600ce3b6d3d3511a7f148328a5920e9b3c9d56be
parent56edbac842e7a8cd256bf099715265a793c92d55 (diff)
downloadfileserv-822cc3f646945d95ef00b96e881aa67f97b1d7a2.tar.gz
fileserv-822cc3f646945d95ef00b96e881aa67f97b1d7a2.tar.bz2
Fix manpage
-rw-r--r--src/fileserv.88
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fileserv.8 b/src/fileserv.8
index 0aecd3c..500e153 100644
--- a/src/fileserv.8
+++ b/src/fileserv.8
@@ -1,40 +1,40 @@
.\" This file is part of fileserv -*- nroff -*-
.\" Copyright (C) 2017, 2018 Sergey Poznyakoff
.\"
.\" Fileserv is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3, or (at your option)
.\" any later version.
.\"
.\" Fileserv is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with fileserv. If not, see <http://www.gnu.org/licenses/>.
-.TH FILESERV 8 "April 21, 2018" "FILESERV" "User Commands"
+.TH FILESERV 8 "April 23, 2018" "FILESERV" "User Commands"
.SH NAME
fileserv \- simple http server for static files
.SH SYNOPSIS
\fBfileserv\fR\
[\fB\-fhsv\fR]\
[\fB\-a\fR [\fIIP\fR][\fB:\fIPORT\fR]]\
[\fB\-c\fR \fIFILE\fR]\
[\fB\-g\fR \fIGROUP\fR]\
[\fB\-u\fR \fIUSER\fR]\
[\fIHOST\fB:\fR]\fIURL\fB:\fIDIR\fR ...
.SH DESCRIPTION
A simple and lightweight HTTP server. It serves static files from one
or more directories on the file system. The directories to be used and
the corresponding URLs are defined in the form of mappings, either in
the command line or in the configuration file. The mapping
.PP
.EX
\fIPATH\fR:\fIDIR\fR
.EE
.PP
instructs the server to map all URLs that begin with the path prefix
\fIPATH\fR to the directory \fIDIR\fR on the file system. The mapping
.PP
.EX
@@ -305,89 +305,89 @@ The server will select this error description whose Content-language header
matches the language definitions from the \fBAccept\-Language\fR
request header.
.SS Listing template
The following statements control generation of directory index
listings (see the \fBlisting\fR statement, above).
.TP
\fBindex\-template\fR \fIFILE\fR
By default, \fBfileserv\fR uses the built-in template (see
the file \fBsrc/defidx.html\fR). This statement instructs it to use
\fIFILE\fR instead. See the section \fBLISTING TEMPLATE FILE\fR, for a
discussion of its syntax. \fIFILE\fR must be an absolute file name.
.TP
\fBindex\-css\fR \fIFILE\fR
Name of the CSS file to use in listings. It will be available in the
\fB$INDEXCSS\fR template variable. \fIFILE\fR must be an absolute file
name.
.TP
\fBmime\-icon\fR \fIURL\fR [\fBalt=\fITEXT\fR] \fITYPE\fR [\fITYPE\fR...]
Defines icon to use for files of given MIME types. Each \fITYPE\fR is
treated as globbing pattern (see \fBglob\fR(7)). \fIURL\fR is the
URL of the image file to be displayed for matching files, and \fITEXT\fR
is the alternative text.
.TP
\fBname\-icon\fR \fIURL\fR [\fBalt=\fITEXT\fR] \fISUFFIX\fR [\fISUFFIX\fR...]
-Defines icon for to use file names that end in one of the \fISUFFIX\Res. See
+Defines icon for to use file names that end in one of the \fISUFFIX\fRes. See
\fBmime\-icon\fR, for the description of \fIURL\fR and \fITYPE\fR.
.TP
\fBtype\-icon\fR \fIURL\fR [\fBalt=\fITEXT\fR] \fITYPE\fR [\fITYPE\fR...]
Defines icon to use for file of the given type. Available \fITYPE\fRs
are: \fBDIRECTORY\fR, for a directory, \fBFILE\fR, for a regular file,
and \fBBLANK\fR, for a blank line.
.SH LISTING TEMPLATE
Listing template file is used to produce directory listings. It is a
normal HTML file, except for the following special constructs:
.TP
.BI "{% " STRING " %}"
Replaced with the expansion of \fISTRSING\fR
.TP
.BI "{% if " STRING " %}"
Starts conditional construct. The syntax is:
.EX
{% if \fISTRING\fR %}
.I " TEXT-IF-TRUE"
{% else %}
.I " TEXT-IF-FALSE"
{% endif %}
.EE
If the expansion if \fISTRING\fR is not empty, the construct is
replaced with \fITEXT-IF-TRUE\fR, otherwise it is replaced with
\fITEXT-IF-FALSE\fR. The else branch is optional.
.TP
.B {% loop %}
Starts main loop. The syntax is:
.EX
{% loop %}
.I " TEXT"
{% endloop %}
.EE
For each file found in the directory being listed, the loop construct
produces expansion of \fITEXT\fR.
.PP
The \fIexpansions\fR performed on strings in template constructs are:
-.Ss Variable expansion
+.SS Variable expansion
Variable expansion replaces each occurrence of
.BI $ NAME
or
.BI ${ NAME }
with the value of the templave variable \fINAME\fR.
.PP
The forms below test for a variable that is unset or null. Omitting the
colon results in a test only for a variable that is unset.
.TP
.BI ${ variable :- word }
.BR "Use Default Values" .
If \fIvariable\fR is unset or null, the expansion of \fIword\fR is substituted.
Otherwise, the value of \fIvariable\fR is substituted.
.TP
.BI ${ variable := word }
.BR "Assign Default Values" .
If \fIvariable\fR is unset or null, the expansion of \fIword\fR is
assigned to \fIvariable\fR. The value of \fIvariable\fR is then substituted.
.TP
.BI ${ variable :? word }
.BR "Display Error if Null or Unset" .
If \fIvariable\fR is null or unset, the expansion of \fIword\fR (or a
message to that effect if word is not present) is sent to the
program error output stream. Otherwise, the value of \fIvariable\fR is
@@ -474,41 +474,41 @@ Reverts the current sort order for the sorting column
.nf
.ta 8n 20n
.ul
N File name
M File modification date
S File size
D Description
.fi
.sp
Return value is \fBA\fR for ascending, and \fBD\fR for descending
order.
.sp
This function is useful to create listing ordering menu, e.g.:
.sp
.EX
<th>
<a href="?C=N&amp;O={% $(sortorder N) %}">Name</a>
</th>
<th>
<a href="?C=M&amp;O={% $(sortorder M) %}">Last modified</a>
</th>
<th>
<a href="?C=S&amp;O={% $(sortorder S) %}">Size</a>
</th>
-.EE9
+.EE
.SH COPYRIGHT
Copyright \(co 2017, 2018 Sergey Poznyakoff
.br
.na
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
.br
.ad
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.\" Local variables:
.\" eval: (add-hook 'write-file-hooks 'time-stamp)
.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.\\-]* [0-9] \""
.\" time-stamp-format: "%:B %:d, %:y"
.\" time-stamp-end: "\""
.\" time-stamp-line-limit: 20
.\" end:

Return to:

Send suggestions and report system problems to the System administrator.