Collin and list, On Thu, Feb 22, 2024 at 10:19 AM Collin Coe <c...@vanburencountymi.gov> wrote:
> Thank you for your response, see my answers below. > > > - Note "the server understands the request but refuses to authorize > it". > - That was my thought, as if I shut the Apache service down, the > request times out instead. > > - Looking at your URL, it appears your request doesn't go directly > to the QGIS server, but rather goes to mangomap.com > > <https://urldefense.com/v3/__http://mangomap.com__;!!PO4-HVKE-L9l8-c!hPRhCbuNMimPUluNMhaOjOJgXVTDfVBj1JPev1G7lPbcxJRAJ-TJ3tF3MBfmcrEf2zi3lwhtSo22EFtbSFQ2WPE90Tv8$> > (it > is "mangomap" and not "mangomaps", correct?). > - The URL that we program into Mango is below, the one from the error > is what I assume is Mango reformatting the URL behind the scenes as it > presents in their UI to me. Note this URL is something that Mango > advised > us to use for the call on our server. We have tried it with the one > specified in the below question as well to the same results. > - > > https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0 > > If I try to access this URL with curl I get an error, I suppose because no parameters are specified: $ curl ' https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0 ' <?xml version="1.0" encoding="UTF-8"?> <ServerException>Layer(s) not valid</ServerException> $ > > - > - Is your qgis server / apache server / network policy set up to > accept requests from outside your network? > - It is. We have tested with ARCGIS and it is able to pull in the WMS > data fine with the below URL > - > > https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0&crs=EPSG:3857&map=VBCWMS1.qgz&layers=APTEST > > If I try to access this URL with curl I get stuff: $ curl ' https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0&crs=EPSG:3857&map=VBCWMS1.qgz&layers=APTEST ' <?xml version="1.0" encoding="utf-8"?> <WMS_Capabilities version="1.3.0" xsi:schemaLocation=" http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd http://www.qgis.org/wms https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?MAP=VBCWMS1.qgz&SERVICE=WMS&REQUEST=GetSchemaExtension" xmlns:sld="http://www.opengis.net/sld" xmlns:qgs="http://www.qgis.org/wms" xmlns="http://www.opengis.net/wms" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> <Service> <Name>WMS</Name> <Title>VBCWMS1</Title> <KeywordList> <Keyword vocabulary="ISO">infoMapAccessService</Keyword> </KeywordList> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href=" https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?MAP=VBCWMS1.qgz "/> <Fees>conditions unknown</Fees> <AccessConstraints>None</AccessConstraints> </Service> <Capability> <Request> <GetCapabilities> <Format>text/xml</Format> <DCPType> <HTTP> <Get> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href=" https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?MAP=VBCWMS1.qgz& ;"/> </Get> </HTTP> </DCPType> </GetCapabilities> ... </Capability> </WMS_Capabilities> $ If I try the original you sent to me with curl, I get: $ curl ' https://mangomap.com/clients/5dfb3952-42b1-11ee-83b6-027d7e0bb32b/coverage_stores/get_wms_layers?wms_source=https%253A%252F%252Fwms.vanburencountymi.gov%252Fcgi-bin%252Fqgis_mapserv.fcgi.exe%253Fservice%253DWMS%2526request%253DGetCapabilities%2526version%253D1.3.0&_=1708610138093 ' <html><body>You are being <a href="https://mangomap.com/sign-in ">redirected</a>.</body></html>$ which lets me know mangomap.com is doing a redirect as we suspected. If I try with the curl "follow redirects" switch I am sent to mangomap.com's login page: $ curl -L ' https://mangomap.com/clients/5dfb3952-42b1-11ee-83b6-027d7e0bb32b/coverage_stores/get_wms_layers?wms_source=https%253A%252F%252Fwms.vanburencountymi.gov%252Fcgi-bin%252Fqgis_mapserv.fcgi.exe%253Fservice%253DWMS%2526request%253DGetCapabilities%2526version%253D1.3.0&_=1708610138093 ' <!DOCTYPE html> <html> <head> <title>Sign in to Mango</title> ... </html> $ So, so far so good, but not talking to your qgis server yet. You might find it worthwhile continuing this way with curl, supplying your login credentials, so you can get a bit more information on what's going on. > - > - The text "(anonymous)" appears in the log following. Could > this mean that mangomap.com > > <https://urldefense.com/v3/__http://mangomap.com__;!!PO4-HVKE-L9l8-c!hPRhCbuNMimPUluNMhaOjOJgXVTDfVBj1JPev1G7lPbcxJRAJ-TJ3tF3MBfmcrEf2zi3lwhtSo22EFtbSFQ2WPE90Tv8$> > is > trying to access your qgis server as user "anonymous"? > - It is trying to access it anonymously, but I will note that ARCGIS > also accesses it this way and works fine > > - When you configure MangoMap(s) to talk to your qgis server, have > you entered the necessary credentials (user name and password)? > - See above, it is availible anonymously. We will be locking it down > with creds eventually, but for testing it is > > Got it. > > - > - Can you verify that your qgis server is ok to respond to the > "getcapabilities" request with the parameters supplied? Ie maybe try it > with curl from inside your network? > - This is one spot that I am thinking I am missing. I do have the > allowed access type of GET allowed, in fact for testing we have all > access > types allowed at the moment, but I am not sure that we have set that up > properly. Below is a screencap of that part of my Apache config file. I > shared that with the Mango folks, and they seen to think it looks good. > > We've verified above that your Apache / QGIS configuration is correct using curl to access the URL you provided. So I don't think you need to tweak things in Apache. I've pulled the redirect URL out of the mangomap.com URL you provided in your first email; it looks like this: https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0&_=1708610138093 When I try a curl with that, I get a "Layer(s) not valid" exception returned: $ curl ' https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0&_=1708610138093 ' <?xml version="1.0" encoding="UTF-8"?> <ServerException>Layer(s) not valid</ServerException> $ So it looks to me like MangoMaps is mangling your calls to getCapabilities. In particular MangoMaps is not supplying the parameters: crs=EPSG:3857 map=VBCWMS1.qgz layers=APTEST that your working test call supplied, while it is supplying version=1.3.0 _=1708610138093 Not sure what that "_" parameter is. Maybe map extent or map centre or something like that, in some kind of fixed format? So something needs to be adjusted in the MangoMaps config so that it sends the crs, the map and the layers required. -- Chris Hermansen · clhermansen "at" gmail "dot" com C'est ma façon de parler.
_______________________________________________ QGIS-User mailing list QGIS-User@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user