mirror of
https://github.com/static-web-server/static-web-server.git
synced 2026-01-25 05:06:33 +00:00
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).
19 lines
536 B
SYSTEMD
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
|