Hi,

All Mapserver admins do that error every now and then.

There is a configuration option in the QGIS WMS Connection editor “Ignore 
GetMap/GetTile/GetLegendGraphic URI reported in capabilities” that helps to 
access many misconfigured WMS servers. If you check that box the same base URL 
that is used for GetCapabilities is used also for other requests. Other clients 
may have similar configuration option, at least OpenJUMP does.

-Jukka Rahkonen-

Lähettäjä: mapserver-users <mapserver-users-boun...@lists.osgeo.org> Puolesta 
Nathan L via mapserver-users
Lähetetty: torstai 3. kesäkuuta 2021 19.15
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] SUM: MapServer PostGIS: WMS Layers Without Features

Earlier, I asked why my MapServer PostGIS implementation was producing a WMS 
service without any layers in it. The original question in detail is at the 
bottom of this summary.

The responses here and in other forums were quite helpful. It narrowed down the 
problem to about ten areas, which I dutifully examined as a checklist. Richard 
Greenwood's earliest suggestions happened to be the most helpful. He suggested 
to look at the Apache logs to see what requests QGIS or ArcGIS was sending to 
MapServer. I'm glad I did - they kept redirecting in the URL to a "wms.map" 
file at the root directory that didn't exist.

I then looked at my mapfile and lo and behold, I was the one redirecting it! I 
had taken example code from the Setup a Mapfile For Your 
WMS<https://mapserver.org/ogc/wms_server.html#setup-a-mapfile-for-your-wms> 
documentation and hadn't customized it to my implementation. The example code 
wasn't annotated so I didn't realize it included an example that required 
revision.

It was in the WMS Metadata of the mapfile, where:
"wms_onlineresource" "http://localhost/cgi-bin/mapserv.exe?map=wms.map&?";

I changed it to point to the actual mapfile location:
"wms_onlineresource" 
"http://localhost/cgi-bin/mapserv.exe?map=%2Fms4w%2Fapps%2Fsegis-demo%2Fmap-segis-demo.map&?";

Ironic as it was a line in the mapfile that redirected the run of the program 
away from itself. I'm so very grateful for the responses I received to help me 
solve my (self-inflicted, as many are...) problem.

Nathan Tyler Lowry
Comprehensive GIS Solutions
(719) 208-7092 Desk
(719) 963-3571 Cell
(719) 960-2084 Fax
nathan.tyler.lo...@gmail.com<mailto:nathan.tyler.lo...@gmail.com>
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to