• al="log_format $al_name '\$remote_addr - \$remote_user [\$time_local] "\$request" '
  • '\$status \$body_bytes_sent "\$http_referer" '
  • '"\$http_user_agent" \$http_x_forwarded_for';
  • access_log $al_name.log $al_name;"复制代码我改成了- al="log_format $al_name.log '\$remote_addr - \$remote_user [\$time_local] "\$request" '
  • '\$status \$body_bytes_sent "\$http_referer" '
  • '"\$http_user_agent" \$http_x_forwarded_for';
  • access_log $al_name.log"复制代码这样才生成了日志。

我对nginx研究还不深,刚刚开始。
如有不正确之处,欢迎指正。