1

I am trying to set up a WMS server using MapServer. As per the documentation http://mapserver.org/ogc/wms_server.html, I have added the metadata required for WMS and trying to hit the following URL:

http://localhost:8080/cgi-bin/mapserv.exe?map=mywms.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&

But eventually what I get is just the mapserv.exe which gets downloaded every time. Could someone tell me where I could be wrong.

Below is the metadata for WMS:

"wms_title" "WMS Demo Server"
"wms_onlineresource" "http://localhost:8080/cgi-bin/mapserv.exe?MAP=C:/ms4w/Apache/htdocs/.../.../xyz.map"
"wms_srs" "EPSG:4269 EPSG:4326"
"wms_feature_info_mime_type" "text/html"
"wms_enable_request" "*"

And below is the request:

http://localhost:8080/cgi-bin/mapserv.exe?MAP=C:/ms4w/Apache/htdocs/.../.../xyz.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&

1
  • Try a WMS 1.3.0 request, it has a different mime type and it will show in your browser. For a default configuration you can't change the format of the GetCapabilities response. The parameter you have set is for the response of a GetFeatureInfo request
    – nmtoken
    Commented Feb 25, 2017 at 9:59

1 Answer 1

5

See the MapServer FAQ but this isn't actually the executable but the capabilities document and your browser doesn't recognize the mime type of application/vnd.ogc.xml

4
  • I have defined the mime type under the metadata as following : "wms_feature_info_mime_type" "text/html"
    – SNT
    Commented Apr 17, 2012 at 10:35
  • but capabilities documents have a mime type of application/vnd.ogc.xml
    – Ian Turton
    Commented Apr 17, 2012 at 10:36
  • please have a look at the question where I have pasted the metadata and the request URL.
    – SNT
    Commented Apr 17, 2012 at 10:48
  • please read the FAQ I linked to which answers this question. If you open up the file returned it is in fact xml inside.
    – Ian Turton
    Commented Apr 17, 2012 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.