Opened 6 years ago

Closed 6 years ago

#1676 closed defect (wontfix)

nginx.service for tmpfs /var/log

Reported by: lucserre@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.10.x
Keywords: service tmpfs Cc:
uname -a: Linux 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
nginx -V: nginx 1.10.3

Description

Description:
When running /var/log on a tmpfs, the /var/log/nginx folder has not persisted from previous instance of running nginx, for example, after a reboot. The default error.log file /var/log/nginx/error.log is also not there, so no error logging happens.
Also, other services like fail2ban that require the log file fail to start due to that.

Fix:
added the following like to the .service file for systemd before the existing ExecStartPre line.
ExecStartPre=/bin/mkdir -p /var/log/nginx

nginx -V:
uname -a: Linux 4.14.79-v7+ #1159 armv7l GNU/Linux

Change History (1)

comment:1 by thresh, 6 years ago

Resolution: wontfix
Status: newclosed

/var/log/nginx is created when the packages are installed, and the service file assumes that. If your local setup differs from that assumption, it's only fair to provide changes like you suggested via systemctl edit or other similar ways. I don't think that belongs to the upstream packaging.

Note: See TracTickets for help on using tickets.