nginx : access.log and error.log file empty

后端 未结 3 731
别跟我提以往
别跟我提以往 2021-02-12 03:45

I have just installed nginx on Ubuntu 14.04 using the command

sudo apt-get install nginx

Now, when I open my browser and type in the address

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-12 04:08

    It looks like by default they are set to go to stdout and stderr.

    lrwxrwxrwx  1 root root   11 Apr 27  2016 access.log -> /dev/stdout
    lrwxrwxrwx  1 root root   11 Apr 27  2016 error.log -> /dev/stderr
    

    So you can remove the symlinks and should be fine.

    rm -f /var/log/nginx/*
    

提交回复
热议问题