sympa-community.github.io

Incubating the new Sympa documentation site

Configure HTTP server: Using Systemd socket

Requirements

General instruction

First, install Systemd socket and WWSympa FastCGI service. And then configure HTTP server if necessary.

Install Systemd socket

Prepare socket unit file.

/lib/systemd/system/wwsympa.socket:

[Unit]
Description = WWSympa - Web interface for Sympa mailing list manager (socket)

[Socket]
SocketUser = nginx
SocketMode = 0600
ListenStream = /run/sympa/wwsympa.socket

[Install]
WantedBy = sockets.target

If the socket should be read by the other user, you may add a configuration file such as:

/etc/systemd/system/wwsympa.socket.d/socket.conf:

[Socket]
SocketUser=apache

Install WWSympa FastCGI service

Prepare service unit file (Note: Replace $EXECCGIDIR below).

/lib/systemd/system/wwsympa.service:

[Unit]
Description = WWSympa - Web interface for Sympa mailing list manager (service)
After = syslog.target sympa.service

[Service]
User = sympa
Group = sympa
ExecStart = $EXECCGIDIR/wwsympa.fcgi
StandardOutput = null
StandardInput = socket
StandardError = null
Restart=on-failure

[Install]
WantedBy = multi-user.target

Or, you might want to use multiwatch to run multiple workers (Note: Replace $EXECCGIDIR below, but do not replace $FCGI_CHILDREN).

wwsympa.service:

[Unit]
Description = WWSympa - Web interface for Sympa mailing list manager (service)
After = syslog.target sympa.service

[Service]
User = sympa
Group = sympa
ExecStart = /usr/local/multiwatch/bin/multiwatch \
    -f $FCGI_CHILDREN -- \
    $EXECCGIDIR/wwsympa.fcgi
StandardOutput = null
StandardInput = socket
StandardError = null
Environment="FCGI_CHILDREN=5"
EnvironmentFile=-/etc/sysconfig/sympa
Restart=on-failure

[Install]
WantedBy = multi-user.target

Setup HTTP server

Instructions in “Configure HTTP server: Using separate FastCGI service” are also applicable to this chapter.

Stopping and starting service

Stopping service

To stop WWSympa service, stop Systemd socket also:

 ``` bash
 # systemctl stop wwsympa.socket
 # systemctl stop wwsympa.service
 ```

Starting service

To start WWSympa service, start Systemd socket:

 ``` bash
 # systemctl start wwsympa.socket
 ```

wwsympa.service will be invoked automatically when the socket will be accessed.

CC BY-SA 4.0 Unless otherwise specified, the contents of this document are licensed under the Creative Commons - Attribution - ShareAlike license. For more details see LICENSE and AUTHORS.

Theme originally designed by orderedlist