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

Please do not post bug reports, missing feature requests, or demo inquiries. If you have such an inquiry, submit a contact form.

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 (34.1k 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 (34.1k points)
...