Total NGINX beginner here.
My logs currently look like:
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 Firefox/50.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;
(the access_log and error_log lines already exist in the default config, I have put these here solely for context).
I then restart NGINX with:
systemctl restart nginx
I now expect my logs to change and in particular to show the xxx literal values used .. xxx[$time_local]xxx .. but my change makes no difference.
If I change log_format main to log_format combined then the server won't restart.