安哥网络 发表于 2015-12-28 17:51:03

nginx 日记设置 FOR error_log

nginx 日记设置 FOR error_log
nginx 日志设置FOR error_log
      在你配置的NGINX nginx.conf中加入如下代码
  log_formataccess'$remote_addr - $remote_user [$time_local] "$request" '
       '$status $body_bytes_sent "$http_referer" '
       '"$http_user_agent" $http_x_forwarded_for';
  access_log/home/wwwlogs/access.logaccess;
  error_log logs/nginx_error.logdebug;
  error_page 404 = /404.php;
  error_log 日志分为
  nginx的log有以下几种类型: [ debug | info | notice | warn | error | crit ]
在nginx.conf的设置:error_log logs/error.logdebug;
debug 为最详细 crit最少
  在页面里使用 error_log('this is error log') 方法方便调试程序

nginx 日记设置 FOR error_log

页: [1]
查看完整版本: nginx 日记设置 FOR error_log