I\'m using Django with FastCGI + nginx. Where are the logs (errors) stored in this case?
My ngninx logs are located here:
/usr/local/var/log/nginx/*
You can also check your nginx.conf
to see if you have any directives dumping to custom log.
run nginx -t
to locate your nginx.conf
.
# in ngingx.conf
error_log /usr/local/var/log/nginx/error.log;
error_log /usr/local/var/log/nginx/error.log notice;
error_log /usr/local/var/log/nginx/error.log info;
Nginx is usually set up in /usr/local
or /etc/
. The server could be configured to dump logs to /var/log
as well.
If you have an alternate location for your nginx install and all else fails, you could use the find
command to locate your file of choice.
find /usr/ -path "*/nginx/*" -type f -name '*.log'
, where /usr/
is the folder you wish to start searching from.
Type this command in the terminal:
sudo cat /var/log/nginx/error.log
Errors are stored in the nginx log file. You can specify it in the root of the nginx configuration file:
error_log /var/log/nginx/nginx_error.log warn;
On Mac OS X with Homebrew, the log file was found by default at the following location:
/usr/local/var/log/nginx