Linux 安装nginx出现 nginx: [alert] could not open error log file: open() “/usr/local/nginx/logs/error.lo
Linux 安装nginx出现nginx: [alert] could not open error log file: open() “/usr/local/nginx/logs/error.log” failed (2: No such file or directory)和[emerg] 19047#0: open() “/usr/local/nginx/logs/access.log” f
·
Linux 安装nginx出现 nginx: [alert] could not open error log file: open() “/usr/local/nginx/logs/error.log” failed (2: No such file or directory) 和
[emerg] 19047#0: open() “/usr/local/nginx/logs/access.log” failed (2: No such file or directory) 的错误
原因是因为没有这error.log 和access.log 两个文件,我们只需要手动创建这两个文件就可以能成功启动nginx。
1.先创建logs文件夹 命令 mkdir logs
2.创建 error.log 和access.log 命令 vim error.log 和 vim access.log
最后在sbin 下启动nginx就可以使用nginx了。
更多推荐
已为社区贡献1条内容
所有评论(0)