How to map nginx to mattermost server so my mattermost server get https

For feature requests, please see: https://mattermost.com/suggestions/.

For troubleshooting questions, please post in the following format:

Summary
Issue in one concise sentence
I now have 3 different virtual machine servers (mattermost server, mysql server and nginx server)
how to map my nginx proxy to my mattermost server
mattermost server ip:192.168.242.181
mysql server ip:192.168.242.182
nginx server ip:192.168.242.183

Steps to reproduce
Install Mattermost on RHEL 8 — Mattermost documentation (i follo this docs)
How can we reproduce the issue (what version are you using?)
mattermost server 7.10.0
Expected behavior
Describe your issue in detail
I used DNS challenge to get my letsencrypt cert however when put my dns which it is not https but http
Observed behavior
What did you see happen? Please include relevant error messages and/or screenshots.

Hi @7yuki7 and welcome to the Mattermost forums!

Please see this documentation about how to set up nginx as a reverse proxy for a Mattermost application server:

https://docs.mattermost.com/install/config-proxy-nginx.html

Since you already installed nginx and Let’s Encrypt, etc., you probably will only be interested in the part of the configuration that does the reverse proxy to the Mattermost application server. The example configuration you can see in the docs points to 10.10.10.2:8065 for the Mattermost application server, you should replace that with 192.168.242.182:8065 in your setup.
You need to install the Let’s Encrypt certificate to the nginx proxy then and it will take care of the SSL handling and forward unencrypted traffic to the Mattermost application server then.