<div dir="ltr"><div dir="ltr">Collin and list,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 22, 2024 at 10:19 AM Collin Coe <<a href="mailto:CoeC@vanburencountymi.gov">CoeC@vanburencountymi.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg7519245008523005635">
<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thank you for your response, see my answers below.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<ul style="margin-top:0px;margin-bottom:0px;list-style-type:disc">
<li style="font-size:15px;color:rgb(0,0,0)">
<div><span style="font-size:15px;color:rgb(0,0,0)">Note "the server understands the request
but refuses to authorize it".</span></div>
</li><ul style="margin-top:0px;margin-bottom:0px;list-style-type:circle">
<li style="font-size:15px;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px">
<span style="font-size:15px;color:rgb(0,0,0)">That was my thought, as if I shut the Apache service down, the
request times out instead.<br>
<br>
</span></div>
</li></ul>
<li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div style="background-color:rgb(255,255,255);margin:0px">
<div style="text-align:left;text-indent:0px"><span style="font-size:15px;color:rgb(0,0,0)">Looking at your
URL, it appears your request doesn't go directly to the QGIS server, but rather goes to
<a href="https://urldefense.com/v3/__http://mangomap.com__;!!PO4-HVKE-L9l8-c!hPRhCbuNMimPUluNMhaOjOJgXVTDfVBj1JPev1G7lPbcxJRAJ-TJ3tF3MBfmcrEf2zi3lwhtSo22EFtbSFQ2WPE90Tv8$" id="m_7519245008523005635OWA283101d6-6850-ef8d-f901-b7dd231edca2" rel="noopener noreferrer" style="margin:0px" target="_blank">
mangomap.com</a> (it is "mangomap" and not "mangomaps", correct?).</span></div>
</div>
</li><ul style="margin-top:0px;margin-bottom:0px;list-style-type:circle">
<li style="font-size:15px;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px"><span style="font-size:15px;color:rgb(0,0,0)">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.</span></div>
</li><ul style="margin-top:0px;margin-bottom:0px;list-style-type:square">
<li style="font-size:15px;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px"><span style="font-size:15px;color:rgb(0,0,0)"><a href="https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0" id="m_7519245008523005635LPlnk535986" target="_blank">https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0</a><br></span></div></li></ul></ul></ul></div></div></blockquote><div><br></div><div>If I try to access this URL with curl I get an error, I suppose because no parameters are specified:</div><div><br></div><div><span style="font-family:monospace"> $ curl '<a href="https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0">https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0</a>'<br><?xml version="1.0" encoding="UTF-8"?><br><ServerException>Layer(s) not valid</ServerException></span></div><div><span style="font-family:monospace">$</span><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg7519245008523005635"><div dir="ltr"><ul style="margin-top:0px;margin-bottom:0px;list-style-type:disc"><ul style="margin-top:0px;margin-bottom:0px;list-style-type:circle"><ul style="margin-top:0px;margin-bottom:0px;list-style-type:square"><li style="font-size:15px;color:rgb(0,0,0)"><div style="text-align:left;text-indent:0px"><span style="font-size:15px;color:rgb(0,0,0)">
<br>
</span></div>
</li></ul>
</ul>
<li style="font-size:15px;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px"><span style="font-size:15px;color:rgb(0,0,0)">Is your qgis server
/ apache server / network policy set up to accept requests from outside your network?</span></div>
</li><ul style="margin-top:0px;margin-bottom:0px;list-style-type:circle">
<li style="font-size:15px;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px">
<span style="font-size:15px;color:rgb(0,0,0)">It is. We have tested with ARCGIS and it is able to pull in the
WMS data fine with the below URL</span></div>
</li><ul style="margin-top:0px;margin-bottom:0px;list-style-type:square">
<li style="font-size:15px;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px">
<span style="font-size:15px;color:rgb(0,0,0)"><a href="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" id="m_7519245008523005635OWA5d5eae6f-c733-feda-c83c-4da8838f84d4" title="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" rel="noreferrer noopener" target="_blank">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</a><br></span></div></li></ul></ul></ul></div></div></blockquote><div><br></div><div>If I try to access this URL with curl I get stuff:</div><div><br></div><div><span style="font-family:monospace">$ curl '<a href="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">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</a>'</span></div><div><span style="font-family:monospace"><?xml version="1.0" encoding="utf-8"?><br><WMS_Capabilities version="1.3.0" xsi:schemaLocation="<a href="http://www.opengis.net/wms">http://www.opengis.net/wms</a> <a href="http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd">http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd</a> <a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a> <a href="http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd">http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd</a> <a href="http://www.qgis.org/wms">http://www.qgis.org/wms</a> <a href="https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?MAP=VBCWMS1.qgz&SERVICE=WMS&REQUEST=GetSchemaExtension">https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?MAP=VBCWMS1.qgz&SERVICE=WMS&REQUEST=GetSchemaExtension</a>" xmlns:sld="<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>" xmlns:qgs="<a href="http://www.qgis.org/wms">http://www.qgis.org/wms</a>" xmlns="<a href="http://www.opengis.net/wms">http://www.opengis.net/wms</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"><br> <Service><br> <Name>WMS</Name><br> <Title>VBCWMS1</Title><br> <KeywordList><br> <Keyword vocabulary="ISO">infoMapAccessService</Keyword><br> </KeywordList><br> <OnlineResource xmlns:xlink="<a href="http://www.w3.org/1999/xlink">http://www.w3.org/1999/xlink</a>" xlink:type="simple" xlink:href="<a href="https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?MAP=VBCWMS1.qgz">https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?MAP=VBCWMS1.qgz</a>"/><br> <Fees>conditions unknown</Fees><br> <AccessConstraints>None</AccessConstraints><br> </Service><br> <Capability><br> <Request><br> <GetCapabilities><br> <Format>text/xml</Format><br> <DCPType><br> <HTTP><br> <Get><br> <OnlineResource xmlns:xlink="<a href="http://www.w3.org/1999/xlink">http://www.w3.org/1999/xlink</a>" xlink:type="simple" xlink:href="<a href="https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?MAP=VBCWMS1.qgz&">https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?MAP=VBCWMS1.qgz&</a>;"/><br> </Get><br> </HTTP><br> </DCPType><br> </GetCapabilities></span></div><div><span style="font-family:monospace">...</span></div><div><span style="font-family:monospace"> </Capability><br></WMS_Capabilities></span></div><div><span style="font-family:monospace">$</span></div><div><br></div><div>If I try the original you sent to me with curl, I get:</div><div><br></div><div><span style="font-family:monospace">$ curl '<a href="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">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</a>'<br><html><body>You are being <a href="<a href="https://mangomap.com/sign-in">https://mangomap.com/sign-in</a>">redirected</a>.</body></html>$</span></div><div><br></div><div>which lets me know <a href="http://mangomap.com">mangomap.com</a> is doing a redirect as we suspected. If I try with the curl "follow redirects" switch I am sent to <a href="http://mangomap.com">mangomap.com</a>'s login page:</div><div><br></div><div><span style="font-family:monospace"> $ curl -L '<a href="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">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</a>'<br><!DOCTYPE html><br><html><br><head><br> <title>Sign in to Mango</title></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">...</span></div><div><span style="font-family:monospace"><br></html><br>$</span></div><div><br></div><div>So, so far so good, but not talking to your qgis server yet.</div><div><br></div><div>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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg7519245008523005635"><div dir="ltr"><ul style="margin-top:0px;margin-bottom:0px;list-style-type:disc"><ul style="margin-top:0px;margin-bottom:0px;list-style-type:circle"><ul style="margin-top:0px;margin-bottom:0px;list-style-type:square"><li style="font-size:15px;color:rgb(0,0,0)"><div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px"><span style="font-size:15px;color:rgb(0,0,0)">
<br>
</span></div>
</li></ul>
</ul>
<li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px">
<span style="font-size:15px;color:rgb(0,0,0)">The text "(anonymous)" appears in the log following. Could this
mean that <a href="https://urldefense.com/v3/__http://mangomap.com__;!!PO4-HVKE-L9l8-c!hPRhCbuNMimPUluNMhaOjOJgXVTDfVBj1JPev1G7lPbcxJRAJ-TJ3tF3MBfmcrEf2zi3lwhtSo22EFtbSFQ2WPE90Tv8$" id="m_7519245008523005635OWA2df071a2-e4ad-cdab-209b-bf22cd2b4838" rel="noopener noreferrer" style="margin:0px" target="_blank">
mangomap.com</a> is trying to access your qgis server as user "anonymous"?</span></div>
</li><ul style="margin-top:0px;margin-bottom:0px;list-style-type:circle">
<li style="font-size:15px;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px">
<span style="font-size:15px;color:rgb(0,0,0)">It is trying to access it anonymously, but I will note that ARCGIS
also accesses it this way and works fine<br>
<br>
</span></div>
</li></ul>
<li style="font-size:15px;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px">
<span style="font-size:15px;color:rgb(0,0,0)">When you configure MangoMap(s) to talk to your qgis server, have
you entered the necessary credentials (user name and password)?</span></div>
</li><ul style="margin-top:0px;margin-bottom:0px;list-style-type:circle">
<li style="font-size:15px;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px">
<span style="font-size:15px;color:rgb(0,0,0)">See above, it is availible anonymously. We will be locking it down
with creds eventually, but for testing it is<br></span></div></li></ul></ul></div></div></blockquote><div><br></div><div>Got it. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg7519245008523005635"><div dir="ltr"><ul style="margin-top:0px;margin-bottom:0px;list-style-type:disc"><ul style="margin-top:0px;margin-bottom:0px;list-style-type:circle"><li style="font-size:15px;color:rgb(0,0,0)"><div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px"><span style="font-size:15px;color:rgb(0,0,0)">
<br>
</span></div>
</li></ul>
<li style="font-size:15px;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px">
<span style="font-size:15px;color:rgb(0,0,0)">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?</span></div>
</li><ul style="margin-top:0px;margin-bottom:0px;list-style-type:circle">
<li style="font-size:15px;color:rgb(0,0,0)">
<div style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin:0px">
<span style="font-size:15px;color:rgb(0,0,0)">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.</span></div></li></ul></ul></div></div></blockquote><div><br></div><div>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.</div><div><br></div><div>I've pulled the redirect URL out of the <a href="http://mangomap.com">mangomap.com</a> URL you provided in your first email; it looks like this:</div><div><br></div><div><a href="https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0&_=1708610138093">https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0&_=1708610138093</a></div><div><br></div><div>When I try a curl with that, I get a "Layer(s) not valid" exception returned:</div><div><br></div><div>$ curl '<a href="https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0&_=1708610138093">https://wms.vanburencountymi.gov/cgi-bin/qgis_mapserv.fcgi.exe?service=WMS&request=GetCapabilities&version=1.3.0&_=1708610138093</a>'<br><?xml version="1.0" encoding="UTF-8"?><br><ServerException>Layer(s) not valid</ServerException><br>$</div><div><br></div><div>So it looks to me like MangoMaps is mangling your calls to getCapabilities. In particular MangoMaps is not supplying the parameters:</div><div><br></div>crs=EPSG:3857</div><div class="gmail_quote">map=VBCWMS1.qgz</div><div class="gmail_quote">layers=APTEST<div><br></div><div><div><div>
</div>
</div>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg7519245008523005635">
</div></blockquote></div><div>that your working test call supplied, while it is supplying</div><div><br></div><div>version=1.3.0</div><div>_=1708610138093</div><div><br></div><div>Not sure what that "_" parameter is. Maybe map extent or map centre or something like that, in some kind of fixed format?<br></div><div><br></div><div>So something needs to be adjusted in the MangoMaps config so that it sends the crs, the map and the layers required.<br></div><div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Chris Hermansen · clhermansen "at" gmail "dot" com<br><br>C'est ma façon de parler.</div></div></div></div>