nginx set 個log format 作apache log format, 但error

  1. log_format main '$remote_addr - $remote_user [$time_local] '
  2. '"$request" $status $body_bytes_sent "$http_referer" '
  3. '"$http_user_agent" "$http_x_forwarded_for"';

  4. access_log /home/log/nginx/access.log main buffer=16k;
  5. error_log /home/log/nginx/error.log main;
複製代碼
$sudo service nginx configtest

就return ERROR