From 853b82126baa1e8e408a10f91053c52626ffad29 Mon Sep 17 00:00:00 2001 From: hc Date: Wed, 20 Nov 2024 12:51:33 +0800 Subject: working --- config_files/nginx.service | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 config_files/nginx.service (limited to 'config_files/nginx.service') diff --git a/config_files/nginx.service b/config_files/nginx.service new file mode 100644 index 0000000..7b5a697 --- /dev/null +++ b/config_files/nginx.service @@ -0,0 +1,23 @@ +[Unit] +Description=The nginx HTTP and reverse proxy server +After=network-online.target remote-fs.target nss-lookup.target +Wants=network-online.target + +[Service] +Type=forking +PIDFile=/run/nginx.pid +# Nginx will fail to start if /run/nginx.pid already exists but has the wrong +# SELinux context. This might happen when running `nginx -t` from the cmdline. +# https://bugzilla.redhat.com/show_bug.cgi?id=1268621 +ExecStartPre=/usr/bin/rm -f /run/nginx.pid +ExecStartPre=/usr/sbin/nginx -t +ExecStart=/usr/sbin/nginx +ExecReload=/usr/sbin/nginx -s reload +KillSignal=SIGQUIT +TimeoutStopSec=5 +KillMode=mixed +PrivateTmp=true +Environment="OPENSSL_CONF=/etc/pki/tls/openssl.pkcs11.cnf" + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3-70-g09d2