View Full Version : How is "<online-resource>" in config.xml of WMS used in relation to SQUID?
09-01-2009, 05:32 PM
It seems "<online-resource>" in config.xml of WMS play a very important role in working with the SQUID.
But i could not find any clue in the source codes of both WMS and WWJ that "<online-resource>" make WWJ change its requesting port from 8084 to 80.
It must be my recklessness. But could some one gives the detail processes how the WWJ change its port when WMS working with SQUID?
Also, i find the SQUID don't cache any image or eleation data but only the capacity.xml data. That is why?
09-14-2009, 05:49 PM
You need to specify <online-resource/> element in the WEB-INF/config.xml regardless of usage of SQUID.
The content of WEB-INF/config.xml /<online-resource> is used in the GetCapabilities response and tells WWJ client the URL (hostname and port) from where to send getMap requests.
If you do not have SQUID OR any load-balancing OR web-proxy solution in front of your WMS server, you must specify your WMS server's fully qualified domain name and the same port your WMS is listening.
But what is you have a firewall or enterprise switch forwarding that exposes only port 9000 (or 80, or any other). How you wil tell client to send getMap requests to myWMS.myGIS.net:9000 when your WMS is listening on 8080?
This is your solution:
---------------- when you have SQUID -------
Now, with SQUID listening on port 3129, for example.
When your firewall/switch listens on port 80, forwards to SQUID on 3129, and squid forwards requests to WMS which is listening on port 8080.
Another scenario: you have two WMS servers configured for load-balancing or/and failover (know that squid could do load-balancing for you, see http://forum.worldwindcentral.com/showthread.php?t=21951, page 2)
In this case, you also need to specify FQDN and PORT of the load balanceing service (or machine) in the WEB-INF/config.xml /<online-resource>
09-14-2009, 05:54 PM
I forgot to answer why your SQUID is not caching imagery.
Did you follow all steps from here http://forum.worldwindcentral.com/showthread.php?t=21407 ?
Take a look on step 10 - we need to tell SQUID to enable caching dynamic requests, the ones that have "?" in the url. By default SQUID is not caching dynamic requests.
Also, steps 6 and 7 show how to tell SQUID to cache WMS imagery (/wms) and elevation (/elev) requests.
If you have more questions about SQUID configuration, let's discuss them in this thread http://forum.worldwindcentral.com/showthread.php?t=21407
09-15-2009, 03:06 PM
thank you very much, dear garakl !
vBulletin® v3.7.1, Copyright ©2000-2013, Jelsoft Enterprises Ltd.