I'm using django with fastcgi + nginx. I want to know where the logs (error) are stored in this case
相关问题
- Django __str__ returned non-string (type NoneType)
- Django & Amazon SES SMTP. Cannot send email
- Django check user group permissions
- Django restrict pages to certain users
- UnicodeEncodeError with attach_file on EmailMessag
You can use
lsof
(list of open files) in most cases to find open log files without knowing the configuration.Example:
Find the PID of httpd (same concept applies for nginx and other programs):
Then search for open log files using
lsof
with the PID:If
lsof
prints nothing, even though you expected the log files to be found, issue the same command usingsudo
.You can read a little more here.
My ngninx logs are located here:
You can also check your
nginx.conf
to see if you have any directives dumping to custom log.run
nginx -t
to locate yournginx.conf
.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.