After apache-nginx log is deleted and a file is re-created, the log cannot be displayed.
阿神2017-05-16 17:00:43
0
2
434
There is a web.log file under the project root directory. The file was too big, so I deleted it and re-created an empty .log file. Now there is no log in this new file, and the pictures are of the old file. information
你删除日志的时候如果没有停止nginx,nginx持有的还是旧文件的句柄,新建的文件虽然同名,但其实不是同一个文件,所以没有写进去。
这时候需要重新加载下nginx
以后再清空日志不要直接删文件,用命令去清空文件
新建的日志文件的权限有没有配置正确,是否赋予了写权限。