Where are the Nginx Error and Access Log Files Located?

To view the nginx error log and access log files, we can use tail to display the last 200 entries.

sudo tail /var/log/nginx/error.log -n 200
sudo tail /var/log/nginx/access.log -n 200

Let me know in the comments if this helped. Follow me @DevAnswers or buy me a beer 🍺

Feedback

Your email address will not be published. Required fields are marked *

We use Markdown to style comments, like on Github and Reddit.
To do a line break, type two spaces after the sentence.
You can add inline code by wrapping it in backticks: `code here`

    To do an entire block of code  
    type four spaces before the line
    and it will appear in a block like this.
    <-- four empty spaces