Welcome to Headwind MDM Q&A, where you can ask questions and receive answers from other members of the community.

IMPORTANT: Please notify the team about your question by filling in the form on the contact page. Otherwise, we may miss your question!

0 votes
We have a HTTP server running nginx.

How to proxy web traffic to Headwind MDM through nginx? We would like to run it on the 443 port.
by (9.9k points)

1 Answer

0 votes

If you have setup HTTPS certificates on your nginx server, you do not need to encrypt the traffic between nginx and Tomcat, so you can run Tomcat on port 8080.

Add the following lines to your nginx.conf file:

http {

    ...

    upstream hmdm {

        server your-mdm-host.com:8080;

    }

    ...

}

You have two options:

1. Assign a directory on your host to the MDM service, for example, https://your-mdm-host.com/hmdm will open Headwind MDM.

To set up this option, add the following lines to your nginx.conf file:

server {

    ...

    location ^~ /hmdm/ {

        proxy_pass http://hmdm;

        proxy_set_header Host $host;

        proxy_set_header X-Real-IP $remote_addr;

    }

    ...

}

2. Redirect a root directory to the MDM service. For example, https://your-mdm-host.com will open Headwind MDM.

Add the following line as a LAST rule in nginx.conf.

server {

    ...

    location ^~ / {

        proxy_pass http://hmdm;

        proxy_set_header Host $host;

        proxy_set_header X-Real-IP $remote_addr;

    }

    ...

}

Do not forget to apply changes by restarting nginx or using commands

nginx -s reload

or 

service nginx reload

by (9.9k points)
...