By default, the Nginx access log is located at /var/log/nginx/access. log and the error log is located at /var/log/nginx/error.
What is Nginx error log?
Nginx error logs are used to log general error messages. If you experience an error in your web application, it is always good practice to check the Nginx error log file to see if there is any additional information as to why the error occurred. The error_log directive can be defined in your nginx.conf file.
How do I enable nginx logs?
Error log should be enabled by default. If it’s not, you can enable it manually in the Nginx configuration file using the error_log directive. error_log /var/log/nginx/error.