unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36388: nginx startup logging error, at odds with documentation
@ 2019-06-26  5:18 Robert Vollmert
  2019-06-26 18:23 ` bug#36388: activation? Robert Vollmert
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Vollmert @ 2019-06-26  5:18 UTC (permalink / raw)
  To: 36388

The documentation states:

   At startup, ‘nginx’ has not yet read its configuration file, so it
uses a default file to log error messages.  If it fails to load its
configuration file, that is where error messages are logged.  After the
configuration file is loaded, the default error log file changes as per
configuration.  In our case, startup error messages can be found in
‘/var/run/nginx/logs/error.log’, and after configuration in
‘/var/log/nginx/error.log’.  The second location can be changed with the
LOG-DIRECTORY configuration option.

But I see:

creating nginx log directory '/var/log/nginx'
creating nginx run directory '/var/run/nginx'
creating nginx temp directories '/var/run/nginx/{client_body,proxy,fastcgi,uwsgi,scgi}_temp'
nginx: [alert] could not open error log file: open() "/gnu/store/byd116qs89b0am4zwjf4vjai7qlskvaw-nginx-1.17.0/logs/error.log" failed (2: No such file or directory)

It seems the documentation assumes nginx’s prefix directory is /var/run/nginx
instead of in the store. Some likely ways to improve this would be to pass
`-p /var/run/nginx` or `-g “error_log /var/log/nginx/error.log”` as command
line flags when starting nginx:

$ /gnu/store/byd116qs89b0am4zwjf4vjai7qlskvaw-nginx-1.17.0/sbin/nginx -h
nginx version: nginx/1.17.0
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]

Options:
  -?,-h         : this help
  -v            : show version and exit
  -V            : show version and configure options then exit
  -t            : test configuration and exit
  -T            : test configuration, dump it and exit
  -q            : suppress non-error messages during configuration testing
  -s signal     : send signal to a master process: stop, quit, reopen, reload
  -p prefix     : set prefix path (default: /gnu/store/byd116qs89b0am4zwjf4vjai7qlskvaw-nginx-1.17.0/)
  -c filename   : set configuration file (default: conf/nginx.conf)
  -g directives : set global directives out of configuration file

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#36388: activation?
  2019-06-26  5:18 bug#36388: nginx startup logging error, at odds with documentation Robert Vollmert
@ 2019-06-26 18:23 ` Robert Vollmert
  2019-06-27 15:21   ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Vollmert @ 2019-06-26 18:23 UTC (permalink / raw)
  To: 36388

Could it be that the errors happen in the activation script,
but not when actually starting nginx? I see in the code that
we appear to pass a “-p” flag already when starting nginx;
maybe we should simply do the same when testing the config
during activation?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#36388: activation?
  2019-06-26 18:23 ` bug#36388: activation? Robert Vollmert
@ 2019-06-27 15:21   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2019-06-27 15:21 UTC (permalink / raw)
  To: Robert Vollmert; +Cc: 36388

Hi,

Robert Vollmert <rob@vllmrt.net> skribis:

> Could it be that the errors happen in the activation script,
> but not when actually starting nginx? I see in the code that
> we appear to pass a “-p” flag already when starting nginx;
> maybe we should simply do the same when testing the config
> during activation?

Probably, that must be where the error comes from.

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-27 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26  5:18 bug#36388: nginx startup logging error, at odds with documentation Robert Vollmert
2019-06-26 18:23 ` bug#36388: activation? Robert Vollmert
2019-06-27 15:21   ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).