[mapserver-users] Mapserver as WMS on Windows

bimuellererwin erwin.bimueller at lkee.de
Fri Jul 29 05:25:50 PDT 2016


Hello,


I am trying to set up MS4W 3.1.4 on Windows Server 2008 R2 Standard as a WMS Server for internal use of the WMS. I have successfully installed Apache, created a mapfile with a layer and I am able to post requests to Mapserver. My mapfile has the following content:


# Mapfile fuer die autarke Darstellung von Rasterdaten fuer den Katastrophenschutz im Landkreis Elbe-Elster


MAP
  EXTENT 345000 5682322 440000 5754034
  FONTSET "D:\ms4w\Apache\Fonts\fonts.list"
  IMAGECOLOR 255 255 255
  IMAGETYPE png
  SYMBOLSET "D:\ms4w\Apache\Symbols\symbol.sym"
  SIZE 600 500
  STATUS ON
  UNITS METERS
  NAME "Rasterdaten autark"


  DEBUG ON
  OUTPUTFORMAT
    NAME png
    MIMETYPE image/png
    DRIVER GD/PNG
    EXTENSION png
    IMAGEMODE RGB
    TRANSPARENT FALSE
  END


  PROJECTION
    "init=epsg:25833"
  END
  LEGEND
      IMAGECOLOR 255 255 255
    KEYSIZE 25 15
    KEYSPACING 5 5
    LABEL
      ANGLE 0.000000
      ANTIALIAS TRUE
      FONT arial
      MAXSIZE 256
      MINSIZE 4
      SIZE 10
      TYPE TRUETYPE
      BUFFER 0
      COLOR 0 0 0
      FORCE FALSE
      MINDISTANCE -1
      MINFEATURESIZE -1
      OFFSET 0 0
      PARTIALS TRUE
    END
    POSITION LL
    STATUS ON
  END


  QUERYMAP
    COLOR 255 255 0
    SIZE 300 300
    STATUS ON
    STYLE HILITE
  END


  REFERENCE
    COLOR -1 -1 -1
    EXTENT 3.35726e+06 5.68232e+06 3.42886e+06 5.75403e+06
    IMAGE "D:\ms4w\Apache\images\reference.png"
    OUTLINECOLOR 255 0 0
    SIZE 150 150
    STATUS ON
      MARKER 0
      MARKERSIZE 0
      MINBOXSIZE 3
      MAXBOXSIZE 0
  END


  SCALEBAR
    BACKGROUNDCOLOR 255 255 255
    COLOR 0 0 0
    IMAGECOLOR 255 255 255
    INTERVALS 4
    LABEL
      SIZE MEDIUM
      TYPE BITMAP
      BUFFER 0
      COLOR 0 0 0
      FORCE FALSE
      MINDISTANCE -1
      MINFEATURESIZE -1
      OFFSET 0 0
      PARTIALS TRUE
    END
    OUTLINECOLOR 0 0 0
    POSITION LL
    SIZE 300 5
    STATUS ON
    STYLE 0
    UNITS METERS
  END


  WEB
    EMPTY "D:\ms4w\Apache\html\emptytemplate.html"
    FOOTER "D:\ms4w\Apache\html\footer.html"
    HEADER "D:\ms4w\Apache\html\header.html"
    IMAGEPATH "D:\ms4w\Apache\tmp"
    IMAGEURL "D:\ms4w\Apache\tmp"
    LOG "D:\ms4w\Apache\logs"
      METADATA
        "wms_onlineresource" "http://10.224.160.25:8080/cgi-bin/mapserv.exe?map=D:\ms4w\Apache\cgi-bin\mapfile.map&"
        "ows_schemas_location" "http://10.224.160.25/cgi-bin"
        "wms_title" "Rasterdaten autark"
        "wms_enable_request" "*"
        "ows_enable_request" "*"
      END
    QUERYFORMAT text/html
    TEMPLATE "D:\ms4w\Apache\html\lkee.html"
  END


  LAYER
    NAME "dtk10far"
    OFFSITE 255 255 255
    SIZEUNITS PIXELS
    STATUS ON
    TILEINDEX "D:\Disma5\geodaten\TKs\TKs2009\DTK10\DTK10FAR\25833\dtk10far.shp"
    TILEITEM "location"
    TOLERANCE 0
    TOLERANCEUNITS PIXELS
    TYPE RASTER
    UNITS METERS
    CLASS
      NAME "dtk10far"
      METADATA
      END
      STYLE
      END
    END
  END
END


This file is a modified copy of an older mapfile that was used on a linux system and worked well as WMS server.


When I send the request


http://disma:8080/cgi-bin/mapserv.exe?map=D:\ms4w\Apache\cgi-bin\mapfile.map&SERVICE=WMS&REQUEST=Getmap&VERSION=1.1.1&LAYERS=dtk10far&SRS=EPSG:25833&BBOX=360575,5688787,425797,5752560&FORMAT=PNG&WIDTH=600&HEIGHT=600


I get a map image as I expected. So far so good.


But I want to use Mapserver as Mapserver for use in the intranet. It will be requested by a single client on the same host that has a WMS interface. Now, when I send a GetCapabilities request


http://disma:8080/cgi-bin/mapserv.exe?map=D:\ms4w\Apache\cgi-bin\mapfile.map&request=GetCapabilities


I simply get nothing, a white page, no error message, no entry in error.log


I wonder if the somewhat ugly wms_onlineresource is responsible ("wms_onlineresource"   "http://10.224.160.25:8080/cgi-bin/mapserv.exe?map=D:\ms4w\Apache\cgi-bin\mapfile.map&"). But when I comment this line out, the result is unchanged.


What do I have to change to make Mapserver work as a WMS server?


Sincerely
Erwin


Erwin Bimüller
GIS-Verantwortlicher im Landkreis Elbe-Elster
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160729/bafd9068/attachment.html>


More information about the mapserver-users mailing list