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
600
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
If you do not stop nginx when you delete the log, nginx still holds the handle of the old file. Although the newly created file has the same name, it is not actually the same file, so it is not written. You need to reload nginx at this time
nginx -s reload
When clearing the log in the future, do not delete the file directly. Use the command to clear the file
If you do not stop nginx when you delete the log, nginx still holds the handle of the old file. Although the newly created file has the same name, it is not actually the same file, so it is not written.
You need to reload nginx at this time
When clearing the log in the future, do not delete the file directly. Use the command to clear the file
Whether the permissions of the newly created log file are configured correctly and whether write permissions are granted.