Then the problem is not NGINX but that your mattermost instance is not running.
can you cd to cd /opt/mattermost/bin
and the run ./platform
and see if it runs?
Then the problem is not NGINX but that your mattermost instance is not running.
can you cd to cd /opt/mattermost/bin
and the run ./platform
and see if it runs?