# How to view nginx log inside Discourse?

**URL:** <https://meta.discourse.org/t/how-to-view-nginx-log-inside-discourse/208743>\
**Category:** Self-hosting\
**Created:** [November 10, 2021, 3:17am UTC](https://meta.discourse.org/t/how-to-view-nginx-log-inside-discourse/208743 "2021-11-10T03:17:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Simsnet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simsnet/32/72855_2.png) [@Simsnet](https://meta.discourse.org/u/Simsnet)\
**Post date:** [November 10, 2021, 4:06am UTC](https://meta.discourse.org/t/how-to-view-nginx-log-inside-discourse/208743/2 "2021-11-10T04:06:02Z")

</div>

Discourse runs inside a Docker container, which is essentially like a virtual machine. All components are self-contained so it is rather difficult to lose anything. To see the logs that the NGINX server produces, such as `access` and `error`, you’ll need to go to the logs folder inside the container’s shell.

Exercise caution while inside the shell, as this can break your instance.

Enter your container’s shell using these commands. You can skip `su -` if you’re already root.

```plaintext
su -
cd /var/discourse
./launcher enter app
cd /var/log/nginx

```

Open the file `error.log` in your preferred terminal text editor (I prefer nano only because I’m not an expert, you’ll need to install it first).

```plaintext
nano error.log

```

Locate the last line (the latest entry) of the file by pressing `^V` (CTRL-V). When finished, press `^X` to return to shell.

When finished, run `exit` to return to your CentOS root shell.

---

_[View the full topic](https://meta.discourse.org/t/how-to-view-nginx-log-inside-discourse/208743)._
