nginx: [alert] could not open error log file: open() "/root/soft/nginx/logs/error.log" failed (2: No such file or directory)
2019/04/29 09:51:42 [emerg] 21683#0: open() "/root/soft/nginx/logs/access.log" failed (2: No such file or directory)
启动nginx时报如上错误,百度都说是权限不够,改用root用户执行。但我本来就是用root用户执行的也不行。
解决办法:既然提示文件不存在,那就自己建一个文件夹,然后建error.log和access.log文件
再启动,ok的。