Welcome! Log In Create A New Profile

Advanced

Please open error log after reading config

Posted by philipp 
Please open error log after reading config
October 14, 2011 11:55AM
nginx seems to open the error log first without consulting the config file which has definied another log file location.

I would like to run mulitple instances of nginx on the same server, each instance has a own user. Each instance has a special error log. At present nginx startup reports an error

nginx: [alert] could not open error log file: open() "/SRV/NGX/1.0.8/logs/error.log" failed (2: No such file or directory)

A log location is definied in the nginx.conf:
error_log /SRV/customer123/logs/error.log;

This is a strace of the nginx startup:

open("/SRV/NGX/1.0.8/logs/error.log", O_WRONLY|O_CREAT|O_APPEND, 0644) = -1 ENOENT (No such file or directory)
write(2, "nginx: [alert] could not open er"..., 130nginx: [alert] could not open error log file: open() "/SRV/NGX/1.0.8/logs/error.log" failed (2: No such file or di
rectory)
) = 130
open("/proc/sys/crypto/fips_enabled", O_RDONLY) = 3
read(3, "0\n", 2) = 2
close(3) = 0
open("/etc/pki/tls/openssl.cnf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=9828, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2acd7dca2000
read(3, "#\n# OpenSSL example configuratio"..., 4096) = 4096
read(3, "trings).\n# MASK:XXXX a literal m"..., 4096) = 4096
read(3, "dentifier=keyid:always,issuer:al"..., 4096) = 1636
read(3, "", 4096) = 0
close(3) = 0
munmap(0x2acd7dca2000, 4096) = 0
uname({sys="Linux", node="das342342", ...}) = 0
_sysctl({{CTL_KERN, KERN_RTSIGMAX}, 2, 0x6b0c14, 4, (nil), 0}) = -1 ENOTDIR (Not a directory)
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
uname({sys="Linux", node="degtluv4271", ...}) = 0
open("/SRV/NGX/conf/nginx.conf", O_RDONLY) = 3
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 138
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready