写在前面,GIS服务器必须连通到外网,基于某些情况,可能一个机组有多态服务器,担任不同的角色,有Web服务器、数据库服务器和GIS服务器等,但是可能购买时只有一个外网IP,这样是不行的。JS脚本运行在客户端,gis服务地址相应的在客户端调用,此时如果是内网ip地址,客户端肯定是访问不到的,不同于数据库服务器,应用程序中,直接采用内网ip,因为后台代码运行在服务器端,客户端数据都是服务器返回的,并不实际存在客户端直接从数据库服务器取数据。所以,一个GIS系统中,GIS服务器必须要通向外网。
修改ArcGIS Server服务器端口:
(主要修改两个文件,一个是Server安装路径下的server.xml配置,另一个是GIS服务路径下的*.json配置)
1.找到Server安装路径下的server.xml,如:D:\Program Files\ArcGIS\Server\framework\runtime\tomcat\conf
用写字板打开server.xml,找到如下节点:
<Connector connectionTimeout="20000" maxHttpHeaderSize="65535" maxPostSize="10485760" port="6080" protocol="HTTP/1.1" redirectPort="6443" server=" "/>
修改后server.xml:
<Connector connectionTimeout="20000" maxHttpHeaderSize="65535" maxPostSize="10485760" port="8080" protocol="HTTP/1.1" redirectPort="6443" server=" "/>
其中port属性即是我们需要配置的端口,比如可以将6080修改成8080.
2.找到服务路径下的*.json,如:D:\arcgisserver\config-store\machines
用写字板打开*.json:
{"machineName":"DESKTOP","platform":"Windows 8-amd64-6.2","ports":{"JMXPort":4000,"OpenEJBPort":4001,"NamingPort":4002,"DerbyPort":4003,"tcpClusterPort":4004,"HTTP":6080},"ServerStartTime":1469026052886,"webServerMaxHeapSize":-1,"appServerMaxHeapSize":256,"socMaxHeapSize":64,"webServerSSLEnabled":false,"webServerCertificateAlias":"SelfSignedCertificate","adminURL":"http://DESKTOP:6080/arcgis/admin","configuredState":"STARTED","synchronize":false}
修改后*.json:
{"machineName":"DESKTOP","platform":"Windows 8-amd64-6.2","ports":{"JMXPort":4000,"OpenEJBPort":4001,"NamingPort":4002,"DerbyPort":4003,"tcpClusterPort":4004,"HTTP":8080},"ServerStartTime":1469026052886,"webServerMaxHeapSize":-1,"appServerMaxHeapSize":256,"socMaxHeapSize":64,"webServerSSLEnabled":false,"webServerCertificateAlias":"SelfSignedCertificate","adminURL":"http://DESKTOP:8080/arcgis/admin","configuredState":"STARTED","synchronize":false}
修改ports属性中HTTP属性,比如将6080修改为8080,修改adminURL,将6080修改为8080.
重启ArcGIS Server服务,服务地址端口即被修改为8080.
注意,server.xml中端口应该和*.json中端口保持一致。
时间: 2024-10-18 00:50:39