[Qgis-user] QGIS Server automatically includes port numbers in the GetCapabilities response URLs. How can I change this?

thomas87 thomas.steenbergen at rivm.nl
Mon Aug 5 07:02:44 PDT 2019


Is there a way to modify the getcapabilities request from QGIS Server? We
have set up an installation of QGIS Server on Centos using Lighttpd exposed
on port 8080. 

We are running this setup in an openshift container platform where we create
a route URL to the container of QGIS Server. QGIS Server automatically
recognizes this created route because I see this route in the
getcapabilities. However, QGIS Server adds the exposed portnumber to the
getmap/getlegendgraphic requests. However, the URL does not work with
portnumber, only without. Is there a way to configure the Getcapabilities
request so it doesnt include portnumbers in any of the getlegend/getmap/
etc. requests?

To clarify. If I look in the getcapabilities of a service, I see an online
resourcelink for the getlegendgraphic with portnumber 8080 included.
However, this link does not work. I have to remove :8080 from the URL to
make it work (see below a snippet of the getcapabilities where portnumber is
included in the getlegendurl)
<LegendURL>
<Format>image/png</Format>
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:href="http://route-gpid-12-sscc-geoweb-co:8080/population?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&LAYER=population&FORMAT=image/png&STYLE=default&SLD_VERSION=1.1.0"/>
</LegendURL>

I don't know if this is something I can configure in some config file of
QGIS Server, or that it has something to do with the webserver?

I have a lighttpd web server which is exposed on port 8080. (Maybe) some
relevant information: Lighttpd.conf:

server.document-root = "/"
server.port = 8080

server.modules += ( "mod_setenv" )
server.modules += ( "mod_fastcgi" )
server.modules += ( "mod_accesslog" )
server.modules += ( "mod_rewrite" )

server.errorlog = "/dev/stderr"
accesslog.filename = "/dev/stderr"

setenv.add-environment = ("QGIS_PROJECT_FILE" => "/geo-map/source.qgs")

fastcgi.server = (
  "/" => (
    "mapserver" => (
      "socket" => "/tmp/mapserver-fastcgi.socket",
      "check-local" => "disable",
      "bin-path" => "/usr/libexec/qgis/qgis_mapserv.fcgi",
      "min-procs" => env.MIN_PROCS,
      "max-procs" => env.MAX_PROCS,
      "max-load-per-proc" => env.MAX_LOAD_PER_PROC,
      "idle-timeout" => env.IDLE_TIMEOUT
    )
  )
)



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html


More information about the Qgis-user mailing list