# Gui 2.1.x - error in log --\> open() "/var/www/mender-gui/distindex.html" failed (2: No such file or directory)

**URL:** <https://hub.mender.io/t/gui-2-1-x-error-in-log-open-var-www-mender-gui-distindex-html-failed-2-no-such-file-or-directory/1084>\
**Category:** General Discussions\
**Created:** [September 30, 2019, 11:21pm UTC](https://hub.mender.io/t/gui-2-1-x-error-in-log-open-var-www-mender-gui-distindex-html-failed-2-no-such-file-or-directory/1084 "2019-09-30T23:21:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gil0109](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/gil0109/32/124_2.png) [@gil0109](https://hub.mender.io/u/gil0109)\
**Post date:** [September 30, 2019, 11:21pm UTC](https://hub.mender.io/t/gui-2-1-x-error-in-log-open-var-www-mender-gui-distindex-html-failed-2-no-such-file-or-directory/1084/1 "2019-09-30T23:21:35Z")

</div>

I am updating to the latest version of Mender (2.1.x) in my openshift environment. I noticed that the GUI docker container now has nginx.

The GUI seems to be working with no issues except in the logs, I see the following repeatedly:

2019/09/30 23:20:01 [error] 12#12: \*504 open() “/var/www/mender-gui/distindex.html” failed (2: No such file or directory), client: 127.0.0.1, server: , request: “GET /nginx\_status/ HTTP/1.1”, host: “localhost:8080”  
127.0.0.1 - - [30/Sep/2019:23:20:01 +0000] “GET /nginx\_status/ HTTP/1.1” 404 153 “-” “Sysdig Agent/1.0”

I can’t figure out why the nginx\_status is not parsing the directory correctly. Missing a “/” between dist & index.html.

any help would be appreciated…

---

<div class="post-metadata">

**Author:** ![mzedel](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mzedel/32/261_2.png) [@mzedel](https://hub.mender.io/u/mzedel)\
**Post date:** [October 1, 2019, 12:21pm UTC](https://hub.mender.io/t/gui-2-1-x-error-in-log-open-var-www-mender-gui-distindex-html-failed-2-no-such-file-or-directory/1084/2 "2019-10-01T12:21:19Z")

</div>

Hi @gil0109,  
while the GUI container has nginx and the nginx\_status extension installed, responding with the status is not enabled yet, thus the response to the `GET /nginx_status/` request seems to be referred to the regular index.html serving.  
I’m not entirely sure where the status requests are requested from in the first place, so it might help to look into your openshift configuration. Since I haven’t worked with openshift myself I can only guess that this might be coming from the Sysdig healthchecks.

As to the failure in parsing the directory correctly - that seems to be a fault in the `try_files` part in the nginx config. The PR fixing this is [here](https://github.com/mendersoftware/gui/pull/551). Thanks a lot for bringing this to light!

If you want to add the status reporting yourself in the meantime, it should be enough to mount a modified .conf file to the GUI container and let it point to /etc/nginx/nginx.conf. The modification would be to replace the server section with:

```auto
server {
    access_log /dev/stdout;
    root /var/www/mender-gui/dist;
    index index.html index.htm;
    location /nginx_status {
        stub_status on;
        allow 127.0.0.1;
        deny all;
    }
    location / {
      try_files $uri $uri/index.html /index.html;
    }
  }

```

to the server section. This should help the status requests and prevent the errors from appearing.

PS: the faulty definition in the try\_files was the final slash here:

```auto
try_files $uri $uri/index.html >>/<<index.html;

```

---

<div class="post-metadata">

**Author:** ![gil0109](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/gil0109/32/124_2.png) [@gil0109](https://hub.mender.io/u/gil0109)\
**Post date:** [October 1, 2019, 3:49pm UTC](https://hub.mender.io/t/gui-2-1-x-error-in-log-open-var-www-mender-gui-distindex-html-failed-2-no-such-file-or-directory/1084/3 "2019-10-01T15:49:33Z")

</div>

Worked like a charm. It is strange because I am using your docker container and I have no health checks on the that container. But either way, the issue is fixed with this. I look forward to the patch going into your repo in 2.1.x
