Mattermost, Inc.

Connecting to Mattermost dockers (with nginx) behind another nginx instance

I am trying to run Mattermost behind additional nginx proxy and getting “Error connectign to Mattermost” message in the browser.
My nginx forwards http://myDomain/mm to Mattermost nginx docker (on another port) and getting that error.
Working directly with Mattermost’s nginx works fine. In the logs I found http code 304 - “Not modified”. Any idea of how to configure my nginx so I will be able to connect to Mattermost properly via two nginx instances?
Thank you