summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-04-21 14:59:38 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-04-21 15:02:19 +0300
commit265d2886f8012e84860bbe66f299073ebefe7553 (patch)
tree562f059901ecc4265542a50f7254262e12a83940
parent7482a103eb3b0663518d561a4ed1bf792e1a1f27 (diff)
downloadfileserv-265d2886f8012e84860bbe66f299073ebefe7553.tar.gz
fileserv-265d2886f8012e84860bbe66f299073ebefe7553.tar.bz2
Update docs
-rw-r--r--README40
-rw-r--r--src/fileserv.conf10
2 files changed, 43 insertions, 7 deletions
diff --git a/README b/README
index 577ee9c..3311986 100644
--- a/README
+++ b/README
@@ -7,21 +7,33 @@ where only sporadic serving of static data is needed.
One of such use cases is deployment of LetsEncrypt certificates on a
server that runs only proxy software, such as pound[1] or haproxy[2]. In
this case using e.g. Apache or even lighttpd just to serve
LetsEncrypt challenge requests arriving once in 90 days is clearly an
overkill. Instead, fileserv can be used.
-Start the program as
+Starting the server can be as simple as:
- fileserv -u nobody -a 127.0.0.1 /.well-known/acme-challenge:/var/www/acme/
+ fileserv -u nobody -a 127.0.0.1:8080 /.well-known/acme-challenge:/var/www/acme
-It will be running in background with privileges of the user nobody,
+This instructs it to run in background with privileges of the user nobody
listening on localhost, port 8080. Requests with URL path beginning
with /.well-known/acme-challenge will be served from directory
/var/www/acme. Other requests will be rejected.
+It is more convenient to keep all settings in the configuration file.
+Its name is ${sysconfdir}/fileserv.conf, where ${sysconfdir} is
+determined when compiling the package. Normally, it is /etc or
+/usr/local/etc.
+
+The above command line options are equivalent to the following
+configuration:
+
+ user nobody
+ listen 127.0.0.1:8080
+ mapping /.well-known/acme-challenge:/var/www/acme
+
If the proxy used is pound[1], define the following service in its
configuration file /etc/pound.conf:
Service
URL "^/.well-known/acme-challenge"
BackEnd
@@ -65,20 +77,40 @@ GNU autotools to bootstrap the package first. Run
in the top level source directory. This will create the configure
script and populate the directory with the missing files. Then proceed
as described above.
* Documentation
-Manpage fileserv.3 included. After installing the package, run
+Manpage fileserv.8 included. After installing the package, run
man fileserv.
+* Bug reporting.
+
+Send bug reports to <gray+fileserv@gnu.org.ua>.
+
* References
[1] Pound - http://www.apsis.ch/pound
[2] Haproxy - http://www.haproxy.org
[3] GNU Libmicrohttpd - https://www.gnu.org/software/libmicrohttpd
+
+
+* Copyright information:
+
+Copyright (C) 2017-2018 Sergey Poznyakoff
+
+ Permission is granted to anyone to make or distribute verbatim copies
+ of this document as received, in any medium, provided that the
+ copyright notice and this permission notice are preserved,
+ thus giving the recipient permission to redistribute in turn.
+
+ Permission is granted to distribute modified versions
+ of this document, or of portions of it,
+ under the above conditions, provided also that they
+ carry prominent notices stating who last changed them.
+
Local Variables:
mode: outline
paragraph-separate: "[ ]*$"
version-control: never
End:
diff --git a/src/fileserv.conf b/src/fileserv.conf
index 1b56676..5d24122 100644
--- a/src/fileserv.conf
+++ b/src/fileserv.conf
@@ -15,14 +15,17 @@
# Notice, that the file is created after assuming user privileges, so
# you should make sure that its directory is writable for the user
# fileserv is running as.
pidfile /var/run/fileserv.pid
# Name of the MIME magic file. This file is used to determine the
-# types of the files being served or listed.
-mime-types-file /var/lib/fileserv/mime.types
+# types of the files being served or listed. E.g.:
+#
+# mime-types-file /etc/fileserv/mime.types
+#
+# Default is undefined
# Listen on the given interface
#listen 0.0.0.0:8080
# Name of the per-directory access file.
# The file has the same syntax as /etc/fileserv.conf, except that only
@@ -84,13 +87,14 @@ hidden-files '^\..*' '^#' '~$' '\.rej$' '\.orig$'
# URLs with a path beginning with URL will be mapped to local file paths
# beginning with DIR. Optional HOST part limits the mapping to requests that
# have this value in the HTTP Host: header.
#
# At least one mapping must be defined.
-mapping /:/var/www/static
+mapping /:/var/www/htdocs
+mapping /.well-known/acme-challenge:/var/www/acme/
# ERROR DOCUMENTS
# Customized versions of error pages are looked up in the directory,
# specified by the error-dir statement.
# When reporting a HTTP error, fileserv will search in that directory
# for the first existing file from the following list:

Return to:

Send suggestions and report system problems to the System administrator.