4.nginx -p -c
作者:互联网
nginx -p xxx -c xxx发生了什么
nginx -p aaa -c xxx.conf
nginx回去指定[aaa]目录下,查找xxx.conf配置文件
xxx.conf中的log路径,会在aaa/xxx/xxx.log中生成
# 在自己的家目录下创建ccc文件夹
mkdir ccc
# 执行-p和-c
nginx -p ./ccc/ -c nginx.conf
# 发现报错了,提示./ccc/logs/error.log和/ccc/nginx.conf没有这几个文件,
nginx: [alert] could not open error log file: open() "./ccc/logs/error.log" failed (2: No such file or directory)
2022/03/28 11:28:00 [emerg] 15363#0: open() "./ccc/nginx.conf" failed (2: No such file or directory)
# 复制原来的
cp -r /usr/local/temgine/logs ~/ccc
cp /usr/local/temgine/nginx.conf ~/ccc
标签:logs,xxx,nginx,conf,ccc,log 来源: https://www.cnblogs.com/lxd670/p/16069896.html