I have MapServer installed and configured to act as a WMS and it is working 
fine. The problem I am having comes when I try to enable MapCache. When I 
uncomment the MapCache line in httpd.conf to enable the module and restart 
Apache it fails with the error 'failed to parse file... unexpected closing tag 
</mapcache>.' This seems odd as I have an opening <mapcache> tag in 
mapcache.xml.

My guess is that I made an error when configuring mapcache.xml for my service. 
Unfortunately, since Apache will not start with MapCache enabled, there is 
nothing in error.log describing what is going on.

I am running MapServer 6.1-dev, from MS4W 3.0.4-dev, on Windows Server 2003 
Service Pack 2. The images being served are JPEG hillshades using the NAD83 UTM 
Zone10N projection. I am not trying to reproject the image. The httpd.conf was 
modified to load the module and points to the location of mapcache.xml and the 
directory where the tiles will be saved is open to all users to read, write, 
and execute.

I have attached the GetCapabilities output for the server and the mapcache.xml 
config file. Did I completely miss something in the documentation when building 
the cache config?

- Michael

<?xml version="1.0" encoding="UTF-8"?>

<mapcache>
	<grid name="UTM_Zone10N">
		<metadata>
			<title>NAD83 UTM Zone 10N</title>
		</metadata>
		<!-- Extent is projected bounds for EPSG:26910 from spatialreference.org -->
		<extent>224215.8977 3810589.9220 775784.1023 8548694.5500</extent>
		<srs>EPSG:26910</srs>
		<units>m</units>
		<size>512 512</size>
		<resolutions>529.1663809 352.7775873 176.3887936 88.19439682 44.09719841 22.57776559 11.28888279 5.644441396 2.822220698</resolutions>
	</grid>
	
	<source name="hillshade" type="wms">
		<getmap>
			<params>
				<MAP>c:/ms4w/apps/abagwms/hillshade.map</MAP>
				<VERSION>1.1.1</VERSION>
				<LAYERS>hillshade100m,hillshade30m,hillshade10m</LAYERS>
				<SRS>EPSG:26910</SRS>
				<!-- BBOX values are from GetCapabilities request for largest image, hillshade10m, in Mapfile -->
				<BBOX>399554 3960950 776453 4446280</BBOX>
				<WIDTH>512</WIDTH>
				<HEIGHT>512</HEIGHT>
				<FORMAT>image/png</FORMAT>
				<TRANSPARENCY>true</TRANSPARENCY>
			</params>
		</getmap>
	
		<http>
			<url>http://172.16.1.40/cgi-bin/mapserv.exe?</url>
			<connection_timeout>30</connection_timeout>
		</http>
	</source>
   
	<cache name="hillcache" type="disk">
		<base>E:/srvrcache</base>
	</cache>   
	
	<format name="PNG_FAST" type="PNG">
		<compression>fast</compression>
	</format>
	
	<tileset name="hilltile">
		<!-- Source name from earlier section -->
		<source>hillshade</source>
		<!-- Cache name from earlier section -->
		<cache>hillcache</cache>
		<!-- Grid name from earlier section -->
		<grid>UTM_Zone10N</grid>
		<!-- <grid>g</grid> -->
		<format>PNG</format>
		<metatile>5 5</metatile>
		<metabuffer>10</metabuffer>
		<expires>3600</expires>
	</tileset>

	<service type="wms" enabled="true">
		<full_wms>assemble</full_wms>
		<resample_mode>bilinear</resample_mode>
		<format>PNG</format>
		<!-- <maxsize>4096</maxsize> -->
	</service>
	<service type="wmts" enabled="true"/>
	<service type="tms" enabled="true"/>
	<service type="kml" enabled="false"/>
	<service type="gmaps" enabled="false"/>
	<service type="ve" enabled="false"/>
	<service type="demo" enabled="true"/>
	
	<default_format>PNG_FAST<default_format>
	<errors>report</errors>
	<lock_dir>C:/ms4w/tmp/ms_tmp</lock_dir>

</mapcache>
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd";
 [
 <!ELEMENT VendorSpecificCapabilities EMPTY>
 ]>  <!-- end of DOCTYPE declaration -->

<WMT_MS_Capabilities version="1.1.1">

<!-- MapServer version 6.1-dev (MS4W 3.0.4-dev) OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->

<Service>
  <Name>OGC:WMS</Name>
  <Title>Hillshade</Title>
  <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; xlink:href="http://172.16.1.40/cgi-bin/mapserv.exe?map=c:/ms4w/apps/abagwms/hillshade.map&amp;"/>
  <ContactInformation>
  </ContactInformation>
</Service>

<Capability>
  <Request>
    <GetCapabilities>
      <Format>application/vnd.ogc.wms_xml</Format>
      <DCPType>
        <HTTP>
          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; xlink:href="http://172.16.1.40/cgi-bin/mapserv.exe?map=c:/ms4w/apps/abagwms/hillshade.map&amp;"/></Get>
          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; xlink:href="http://172.16.1.40/cgi-bin/mapserv.exe?map=c:/ms4w/apps/abagwms/hillshade.map&amp;"/></Post>
        </HTTP>
      </DCPType>
    </GetCapabilities>
    <GetMap>
      <Format>image/png</Format>
      <Format>image/jpeg</Format>
      <Format>image/gif</Format>
      <Format>image/png; mode=8bit</Format>
      <Format>application/x-pdf</Format>
      <Format>image/svg+xml</Format>
      <Format>image/tiff</Format>
      <Format>application/vnd.google-earth.kml+xml</Format>
      <Format>application/vnd.google-earth.kmz</Format>
      <DCPType>
        <HTTP>
          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; xlink:href="http://172.16.1.40/cgi-bin/mapserv.exe?map=c:/ms4w/apps/abagwms/hillshade.map&amp;"/></Get>
          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; xlink:href="http://172.16.1.40/cgi-bin/mapserv.exe?map=c:/ms4w/apps/abagwms/hillshade.map&amp;"/></Post>
        </HTTP>
      </DCPType>
    </GetMap>
  </Request>
  <Exception>
    <Format>application/vnd.ogc.se_xml</Format>
    <Format>application/vnd.ogc.se_inimage</Format>
    <Format>application/vnd.ogc.se_blank</Format>
  </Exception>
  <VendorSpecificCapabilities />
  <UserDefinedSymbolization SupportSLD="1" UserLayer="0" UserStyle="1" RemoteWFS="0"/>
  <Layer>
    <Name>Hillshade_greyscale</Name>
    <Title>Hillshade</Title>
    <Abstract>Hillshade_greyscale</Abstract>
    <SRS>EPSG:26910</SRS>
    <SRS>EPSG:4326</SRS>
    <LatLonBoundingBox minx="-127.49" miny="0.000322442" maxx="-127.49" maxy="0.000362308" />
    <BoundingBox SRS="EPSG:26910"
                minx="-124.18" miny="35.75" maxx="-119.76" maxy="40.17" />
    <Layer queryable="0" opaque="0" cascaded="0">
        <Name>hillshade100m</Name>
        <Title>hillshade100m</Title>
        <SRS>EPSG:26910</SRS>
        <SRS>EPSG:4326</SRS>
        <LatLonBoundingBox minx="-124.083" miny="35.8546" maxx="-119.84" maxy="39.8262" />
        <BoundingBox SRS="EPSG:26910"
                    minx="407286" miny="3.97197e+006" maxx="770586" maxy="4.40847e+006" />
        <ScaleHint min="31.9302812023452" max="1995.61139371855" />
    </Layer>
    <Layer queryable="0" opaque="0" cascaded="0">
        <Name>hillshade30m</Name>
        <Title>hillshade30m</Title>
        <SRS>EPSG:26910</SRS>
        <SRS>EPSG:4326</SRS>
        <LatLonBoundingBox minx="-124.083" miny="35.8546" maxx="-119.84" maxy="39.8256" />
        <BoundingBox SRS="EPSG:26910"
                    minx="407346" miny="3.97196e+006" maxx="770586" maxy="4.4084e+006" />
        <ScaleHint min="31.9302812023452" max="124.725712107409" />
    </Layer>
    <Layer queryable="0" opaque="0" cascaded="0">
        <Name>hillshade10m</Name>
        <Title>hillshade10m</Title>
        <SRS>EPSG:26910</SRS>
        <SRS>EPSG:4326</SRS>
        <LatLonBoundingBox minx="-124.179" miny="35.7538" maxx="-119.756" maxy="40.1669" />
        <BoundingBox SRS="EPSG:26910"
                    minx="399554" miny="3.96095e+006" maxx="776453" maxy="4.44628e+006" />
        <ScaleHint min="4.98902848429637" max="31.9297822994968" />
    </Layer>
  </Layer>
</Capability>
</WMT_MS_Capabilities>
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to