小编G G*_*III的帖子

Nginx 忽略配置文件选项

我正在尝试使用特定的配置文件作为 Ubuntu 14.04 上的用户进程启动 nginx。但是我一开始就被阻止了:

$ nginx -c nginx.conf 
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2017/03/30 01:03:46 [emerg] 21805#21805: open() "/usr/share/nginx/nginx.conf" failed (2: No such file or directory)
Run Code Online (Sandbox Code Playgroud)

似乎继续尝试打开默认配置和其他文件。我看到 nginx 是使用以下选项构建的:

$ nginx -V
nginx version: nginx/1.10.1
built with OpenSSL 1.0.1f 6 Jan 2014
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy …
Run Code Online (Sandbox Code Playgroud)

ubuntu configuration nginx ubuntu-14.04

2
推荐指数
1
解决办法
3299
查看次数

标签 统计

configuration ×1

nginx ×1

ubuntu ×1

ubuntu-14.04 ×1