Skip to content

Instantly share code, notes, and snippets.

@kwilczynski
Created June 12, 2021 19:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kwilczynski/f2729d8fad6b937d4ed8994b7afe9299 to your computer and use it in GitHub Desktop.
Save kwilczynski/f2729d8fad6b937d4ed8994b7afe9299 to your computer and use it in GitHub Desktop.
A dummy systemd Unit to fix Nginx error_log problem even when /dev/null path is set
[Unit]
Description=Dummy unit to create log directory for Nginx
After=network.target
[Service]
Type=oneshot
ExecStart=/bin/mkdir -p /var/log/nginx
ExecStart=/bin/chown root:adm /var/log/nginx
ExecStart=/bin/chmod 755 /var/log/nginx
[Install]
WantedBy=nginx.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment