Static website alongside Mattermost with NGINX?

I have Mattermost 5.3.1 up and running using the NGINX configuration outlined in the official guide. Everything is working correctly (Mattermost is awesome!). I’m using CentOS7.

What I’d like to do now is have Mattermost run at a subdirectory ( and have the main domain point to html (with NGINX hosting the html from /var/www/html).

I do sort of understand how NGINX works at this point, but the Mattermost NGINX install procedure adds a lot of complicated stuff to the NGINX config and I’m having a difficult time modifying it without breaking things. I don’t fully comprehend how all the redirections work with the NGINX config the official guide gave me. I tried really hard to figure this out myself but I’m stuck.

Thanks for your time.

Hi @duodecimus, thank you for reaching out.

Can you help with more details on what issues you see, especially any errors in logs or the Console? Also any details about your current Nginx config and any details on specific install steps where you get stuck will be helpful.

I figured it out. My problem was I misunderstood the difference between root and alias directives in NGINX config and I wasn’t mapping to the right directory, giving me a 404.