Files
static-web-server/systemd/static-web-server.socket
Tim Small 24ea110489 Add example systemd unit files, for socket activation.
Example systemd unit files which implement security sandboxing with
systemd, including the use of socket activation (in which systemd binds
TCP network socket listeners, and passes them to static-web-server in
the form of inherited file descriptors).
2021-05-31 11:52:35 +01:00

19 lines
536 B
SYSTEMD

# Example systemd socket unit file (see systemd.socket(5) man page) for use
# with the --fd option of static-web-server. This allows e.g. binding the
# server to a TCP port number 0 - 1023 without running the server as root,
# and/or running sws in an isolated network name space.
#
# A comprehensive description can be found in:
# http://0pointer.de/blog/projects/socket-activation.html
# ...and the linked articles.
[Unit]
Description=Static Web Server Socket
[Socket]
ListenStream=443
Accept=no
[Install]
WantedBy=sockets.target