Total NGINX beginner here.
我的标志目前喜欢:
92.21.236.47 - [08/Jan/2017:00:48:10 +0000] “GET / HTTP/1.1” 200 148“-”“Mozilla/5.0(Windows NT 10.0;WOW64;rv:50.0) Gecko/20100101/560.0”
When I add the following line in the default /etc/nginx/nginx.conf
log_format main $remote_addr - $remote_user xxx[$time_local]xxx
"$request" $status $body_bytes_sent
"$http_referer" "$http_user_agent" ;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
(在缺省会已经存在接触线和错误线,因此我仅作此解释。)
接着,我重新召集国家地理信息小组会议:
systemctl restart nginx
现在,我预计我的原木会发生变化,特别是显示所用的xxx字面值。
If I change log_format main to log_format combined then the server won t restart.