Using an internal Tilecache on a DMZ server

If iShare Maps is configured to make use of tilecaches for base mapping then often the tilecache is placed on the publicly accessible DMZ server. If this is the case then the tilecache has to be updated from an internal copy as and when the base mapping is updated.

The other option with tilecaches is to create a reverse proxy on the DMZ server. This will point to a tilecache held on some internal server. The advantage of this is that the iShare Administrator only has to update one single tilecache - on the internal server. The disadvantage is that there may be some minor performance hit suffered by the internal server. 

The following guide describes the process of setting a reverse proxy to handle tilecache requests.

Tilecache on the internal server

For this example we'll presume there are four virtual directories set up in IIS on the internal server. All of these point to the tilecache root folder and are named tilecache0, tilecache1, tilecache2 and tilecache3.

IIS Configuration on the DMZ server

IIS requires the Application Request Routing module in order to create a reverse proxy. Install this before continuing.

  1. Run IIS
  2. Select the Default Web Site
  3. Select URL rewrite
  4. Select Add Rule
  5. Select Reverse Proxy
  6. When prompted enter the IP address of the internal server in the dialog and click OK.
  7. The URL Rewrite rule should appear in the rules list. Select it and edit.
  8. Edit the pattern so that it reads tilecache0/(.*) and the action URL reads http://x.x.x.x/tilecache0/{R:1}. Click Apply.
  9. Repeat this process for the three other rules using tilecache1, tilecache2 and tilecache3.

iShare MapSource

The mapsource should be configured with four tilecache URIs:

  1. http://<my site>/tilecache0
  2. http://<my site>/tilecache1
  3. http://<my site>/tilecache2
  4. http://<my site>/tilecache3

Now that's configured any request that is for any other of the tilecache0..3 directories will be rewritten to the internal server.