tilegroxy docs

Description

This provider allows tilegroxy to act as the HTTP server for a CGI program like Apache httpd or nginx traditionally acts. The flagship use-case for this is to integrate with MapServer. A full example is available in examples/mapserver.

Example

  • YAML

  • JSON

provider:
  name: cgi
  exec: /usr/bin/mapserv
  uri: "/?map=mapfiles/roads.map&MODE=tile&layers=all&TILEMODE=gmap&TILE={x}+{y}+{z}"
  workingDir: /etc/mapserver
  env:
    MAPSERVER_CONFIG_FILE: mapserver.conf
{
  "provider": {
    "name": "cgi",
    "exec": "/usr/bin/mapserv",
    "uri": "/?map=mapfiles/roads.map&MODE=tile&layers=all&TILEMODE=gmap&TILE={x}+{y}+{z}",
    "workingDir": "/etc/mapserver",
    "env": {
      "MAPSERVER_CONFIG_FILE": "mapserver.conf"
    }
  }
}

Configuration

Configuration options
Parameter Description Type Required Default

Exec

The path to the CGI executable

string

Yes

None

Args

Arguments to pass into the executable in standard "split on spaces" format

string[]

No

None

Uri

The URI (path + query) to pass into the CGI for the fake request - think mod_rewrite style invocation of the CGI

string

Yes

None

Domain

The host to pass into the CGI for the fake request

string

No

localhost

Headers

Extra headers to pass into the CGI with the request

map[string][]string

No

None

Env

Extra environment variables to supply to the CGI invocations. Variable names are converted to uppercase. If the value is an empty string it passes along the value from the main tilegroxy invocation

map[string]string

No

None

WorkingDir

Working directory for the CGI invocation

string

No

Base dir of exec

InvalidAsError

If true, if the CGI response includes a content type that isn’t in the Client's list of acceptable content types then it treats the response body as an error message

bool

No

false