Independent service proxy configuration

Feedback


SuperMap iPortal provides an independent proxy package to offer service proxy function. Service access statistics, HTTPS protocol, and  proxy cache function are also supported.

The advantages of using SuperMap iPortal independent service proxy

Comparing with built-in service proxy, the independent proxy has the following advantages:

  1. Restarting service proxy doesn't affect iPortal service since they are deployed separately.
  2. Easy to scale out service proxy to fit for needs of higher load balancing ability to support more concurrent access.

SuperMap iPortal independent service proxy configuration

This section introduces the configuration process by deploying both iPortal package and the independent proxy package on the same machine and the OS uses Windows 64. You can deploy according to your actual environment.

After the above configurations, start iPortal and proxy services to use proxy service.

If iPortal installation package and the proxy package are deployed on different machines, besides the above configurations, you also need to deploy Nginx service to redirect service. Specifically, if you want o deploy the Nginx on the same machine with iPortal, only the proxy service needs to be redirected; if you want to deploy the Nginx on a different machine with iPortal, both iPortal service and proxy service need to be redirected with Nginx.

  1. Configure Nginx. Open [nginx installation path]\conf\nginx.conf and modify the content of server sub-node under http node.

server {

        listen       80;

        server_name  proxyserver.com;

        location /{

        proxy_pass   http://192.168.120.40:8190;

        proxy_set_header Host $host:80;

        proxy_set_header X-Read-IP $remote_addr;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                      }

            }

server {

        listen       81;

        server_name  proxyserver.com;

        location /{

        proxy_pass   http://192.168.112.172:8195;

        proxy_set_header Host $host:81;

        proxy_set_header X-Read-IP $remote_addr;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                      }

           }

In the above configuration:

  1. Open iportal.xml in iPortal installation package, add <proxyServerRootUrl> sub-node under <serviceProxy> node shown as follows:

<serviceProxy>

         ...

        <port>8195</port>

        <rootUrlPostfix>portalproxy</rootUrlPostfix>

        <proxyServerRootUrl>http://proxyserver.com:81</proxyServerRootUrl>

         ...

</serviceProxy>

In the above configuration:

After the above configurations, reload or restart Nginx service, restart iPortal and independent proxy service to take effect.

If you need to deploy multiple service proxy nodes to implement the load balancing, see: Service proxy load balancing.