Nginx日志时间默认为GMT时间,改为CST时间
在分析、处理Nginx的日志时,访问时间是一个很重要的因素,但是Nginx默认的是 GMT
,北京时间快8个小时。将访问日志记录设置为 CST
更便于我们分析
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/492ca5ac138329ded2db67684cbb664b.png)
根据官方给出的方案
http://nginx.org/en/docs/http/ngx_http_autoindex_module.html
以及我自己的实验,如下方法可行
在 http, server, location下添加 autoindex_localtime on;
重启Nginx
再查看日志
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/034ca36550901dc21c58a9695d42a96d.png)