summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElan Ruusamäe <glen@pld-linux.org>2019-02-05 16:22:43 +0200
committerGlenn Strauss <gstrauss@gluelogic.com>2019-05-11 02:21:03 -0400
commit4f0261e5e1283984b0ab3708b25fe84b564924a7 (patch)
tree3c9d05f22cc98f85748d96bd285a893dd7d9864a
parent146ea6bad0c04a582652d603bd954f10c4a8b83d (diff)
downloadlighttpd-git-4f0261e5e1283984b0ab3708b25fe84b564924a7.tar.gz
[doc] systemd socket activation config example
(minor edits by gstrauss) github: closes #96 x-ref: "doc/systemd: add example lighttpd.socket for systemd socket activation" https://github.com/lighttpd/lighttpd1.4/pull/96
-rw-r--r--doc/config/lighttpd.conf6
-rw-r--r--doc/systemd/Makefile.am2
-rw-r--r--doc/systemd/lighttpd.socket16
3 files changed, 23 insertions, 1 deletions
diff --git a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf
index c8def059..3e687c21 100644
--- a/doc/config/lighttpd.conf
+++ b/doc/config/lighttpd.conf
@@ -104,6 +104,12 @@ server.use-ipv6 = "enable"
server.username = "lighttpd"
server.groupname = "lighttpd"
+##
+## Enable lighttpd to serve requests on sockets received from systemd
+## https://www.freedesktop.org/software/systemd/man/systemd.socket.html
+##
+#server.systemd-socket-activation = "enable"
+
##
## enable core files.
##
diff --git a/doc/systemd/Makefile.am b/doc/systemd/Makefile.am
index 665f164b..5e504e8a 100644
--- a/doc/systemd/Makefile.am
+++ b/doc/systemd/Makefile.am
@@ -1 +1 @@
-EXTRA_DIST=lighttpd.service
+EXTRA_DIST=lighttpd.service lighttpd.socket
diff --git a/doc/systemd/lighttpd.socket b/doc/systemd/lighttpd.socket
new file mode 100644
index 00000000..7e0e5844
--- /dev/null
+++ b/doc/systemd/lighttpd.socket
@@ -0,0 +1,16 @@
+# please note: lighttpd.conf must contain directive:
+# server.systemd-socket-activation = "enable"
+
+[Unit]
+Description=lighttpd socket
+
+[Socket]
+# Enable listening on http port
+ListenStream=80
+# To enable listening on https port, lighttpd config needs SSL setup
+# https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_SSL
+#ListenStream=443
+Service=lighttpd.service
+
+[Install]
+WantedBy=sockets.target