找不到nginx错误日志

时间:2014-03-01 20:52:11

标签: nginx

我的浏览器中有500 Internal Server Error,但我找不到nginx日志来调试它们。这是我的nginx.conf文件:

worker_processes 1;
worker_rlimit_nofile 8192;

events {
  worker_connections  3000;
}

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

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

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

你会认为它们在/var/log/nginx.error.log,但是不,那个文件完全是空的。有什么想法吗?

1 个答案:

答案 0 :(得分:2)

我认为他们会在/var/log/nginx/error.log

另请查看/etc/nginx/sites-enabled/debug可以在其中覆盖日志记录路径。