1.安装nginx,注意不要安装nginx-full
1 | sudo apt-get install nginx |
确认版本
1 | apt list --installed | grep nginx |
2.修改配置 /etc/nginx/nginx.conf
1 | http { |
3.输出的日志
1 | {"ts":"2019-10-13 22:59:48","schema":"com.xxx.xxx","host":"127.0.0.1","clientip":"127.0.0.1","size":0,"responsetime":0.000,"upstreamtime":"-","upstreamhost":"-","http_host":"localhost","url":"/index.html","domain":"localhost","xff":"-","referer":"-","status":"304"} |