<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Stephen,<br><br>do you have an explicit example, please?<br>Does it mean i have to do apache url rewriting?<br><br>my mapcache source tag is it correct? :<br><br><source name="monserv" type="wms"><br>     <http><br>      <span class="tab">    </span><url><a href="http://localhost/cgi-bin/mapserv" target="_blank">http://localhost/cgi-bin/mapserv</a>?</url><br>     </http><br><span class="tab">    </span> <getmap><br><span class="tab">    </span><span class="tab">    </span><params><br><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><FORMAT>image/png</FORMAT><br><span
 class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><LAYERS>dep_point_pop</LAYERS><br><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><MAP>/var/www/mapfile/dep_point.map</MAP><br><span class="tab">    </span><span class="tab">    </span></params><br><span class="tab">    </span></getmap><br></source><br><br><br><br><div><span><br></span></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span
 style="font-weight:bold;">De :</span></b> Stephen Woodbridge <woodbri@swoodbridge.com><br> <b><span style="font-weight: bold;">À :</span></b> mapserver-users@lists.osgeo.org <br> <b><span style="font-weight: bold;">Envoyé le :</span></b> Mardi 19 mars 2013 18h34<br> <b><span style="font-weight: bold;">Objet :</span></b> Re: [mapserver-users] mapcache returns error 400 bad request<br> </font> </div> <br>The point that Thomas is making is that mapcache understands WMS <br>requests NOT mapserver cgi requests<br><br><a href="http://localhost/mapcache?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&layers=test&mode=map&map_imagetype=png&mapext=-135+0+-90+45&imgext=-135+0+-90+45&map_size=256+256&imgx=128&imgy=128&imgxy=256+256"
 target="_blank">http://localhost/mapcache?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&layers=test&mode=map&map_imagetype=png&mapext=-135+0+-90+45&imgext=-135+0+-90+45&map_size=256+256&imgx=128&imgy=128&imgxy=256+256</a><br><br>This does not work because it is not a valid WMS request.<br><br>If you go to the demo page for the WMS service, and view source, then <br>you can see how to setup a OpenLayers to talk to mapcache.<br><br>In FF, if you right click on the map, and select view image, you will <br>see what the url for the image or tile looks like.<br><br>-Steve W<br><br>On 3/19/2013 1:08 PM, Icadedt wrote:<br>> HI,<br>><br>> <a href="http://localhost/mapcache/demo" target="_blank">http://localhost/mapcache/demo</a> works great, all the links inside work<br>> great to.<br>><br>> even if i put out "mode=map" , i have the same error 400 'bad request'<br>><br>> you said "make sure your
 mapserv+mapfile are configured for WMS access",<br>> how to check this?<br>><br>><br>> ------------------------------------------------------------------------<br>> *De :* thomas bonfort <<a ymailto="mailto:thomas.bonfort@gmail.com" href="mailto:thomas.bonfort@gmail.com">thomas.bonfort@gmail.com</a>><br>> *À :* Icadedt <<a ymailto="mailto:icadedt@yahoo.fr" href="mailto:icadedt@yahoo.fr">icadedt@yahoo.fr</a>><br>> *Cc :* "<a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>" <<a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br>> *Envoyé le :* Mardi 19 mars 2013 17h08<br>> *Objet :* Re: [mapserver-users] mapcache returns error 400 bad request<br>><br>> mapcache doesn't understand any "mode=map" mapserver queries, only WMS.<br>><br>>
 - make sure your mapserv+mapfile are configured for WMS access.<br>> - test your mapcache service by going to <a href="http://server/mapcache/demo" target="_blank">http://server/mapcache/demo</a><br>><br>> --<br>> thomas<br>><br>> On 19 March 2013 16:55, Icadedt <<a ymailto="mailto:icadedt@yahoo.fr" href="mailto:icadedt@yahoo.fr">icadedt@yahoo.fr</a><br>> <mailto:<a ymailto="mailto:icadedt@yahoo.fr" href="mailto:icadedt@yahoo.fr">icadedt@yahoo.fr</a>>> wrote:<br>>  > hi ,<br>>  > when i test this url:<br>>  ><br>>  ><br>> <a href="http://localhost/mapcache?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&layers=test&mode=map&map_imagetype=png&mapext=-135+0+-90+45&imgext=-135+0+-90+45&map_size=256+256&imgx=128&imgy=128&imgxy=256+256"
 target="_blank">http://localhost/mapcache?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&layers=test&mode=map&map_imagetype=png&mapext=-135+0+-90+45&imgext=-135+0+-90+45&map_size=256+256&imgx=128&imgy=128&imgxy=256+256</a><br>>  ><br>>  ><br>>  > i get the error 400 'bad request' ?<br>>  ><br>>  ><br>>  > my layer called 'test' comes from mapcache tileset.<br>>  ><br>>  > when i test my url without mapcache it works great:<br>>  ><br>> <a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapfile/dep_point.map&layers=dep_point_pop&mode=map&map_imagetype=png&mapext=135+0+180+45&imgext=135+0+180+45&map_size=256+256&imgx=128&imgy=128&imgxy=256+256"
 target="_blank">http://localhost/cgi-bin/mapserv?map=/var/www/mapfile/dep_point.map&layers=dep_point_pop&mode=map&map_imagetype=png&mapext=135+0+180+45&imgext=135+0+180+45&map_size=256+256&imgx=128&imgy=128&imgxy=256+256</a><br>>  ><br>>  ><br>>  ><br>>  > Here is my mapcache.xml:<br>>  > <?xml version="1.0" encoding="UTF-8"?><br>>  ><br>>  > <!-- see the accompanying mapcache.xml.sample for a fully commented<br>>  > configuration file --><br>>  ><br>>  > <mapcache><br>>  >    <cache name="disk" type="disk"><br>>  >      <base>/tmp</base><br>>  >      <symlink_blank/><br>>  > </cache><br>>  ><br>>  ><br>>  ><br>>  ><br>>  >
 <source name="monserv" type="wms"><br>>  >      <http><br>>  >          <url><a href="http://localhost/cgi-bin/mapserv" target="_blank">http://localhost/cgi-bin/mapserv</a>?</url><br>>  >      </http><br>>  >      <getmap><br>>  >          <params><br>>  >            <FORMAT>image/png</FORMAT><br>>  >            <LAYERS>dep_point_pop</LAYERS><br>>  >            <MAP>/var/www/mapfile/dep_point.map</MAP><br>>  >          </params><br>>  >      </getmap><br>>  >    </source><br>>  ><br>> 
 ><br>>  >    <tileset name="test"><br>>  > <source>monserv</source><br>>  >      <cache>disk</cache><br>>  >      <grid>WGS84</grid><br>>  >      <grid>g</grid><br>>  >      <format>PNG</format><br>>  >      <metatile>5 5</metatile><br>>  >      <metabuffer>10</metabuffer><br>>  >      <expires>3600</expires><br>>  >    </tileset><br>>  ><br>>  ><br>>  >    <default_format>JPEG</default_format><br>>  ><br>>  >    <service type="wms" enabled="true"><br>>  >     
 <full_wms>assemble</full_wms><br>>  >      <resample_mode>bilinear</resample_mode><br>>  >      <format>JPEG</format><br>>  >      <maxsize>4096</maxsize><br>>  >   </service><br>>  >    <service type="wmts" enabled="true"/><br>>  >    <service type="tms" enabled="true"/><br>>  >    <service type="kml" enabled="true"/><br>>  >    <service type="gmaps" enabled="true"/><br>>  >    <service type="ve" enabled="true"/><br>>  >    <service type="demo" enabled="true"/><br>>  ><br>>  >    <errors>report</errors><br>>  >    <lock_dir>/tmp</lock_dir><br>>  ><br>> 
 > </mapcache><br>>  ><br>>  ><br>>  ><br>>  > this is my getcapabilities :<br>>  > <a href="http://localhost/mapcache?service=wms&request=getcapabilities" target="_blank">http://localhost/mapcache?service=wms&request=getcapabilities</a><br>>  ><br>>  > returns:<br>>  ><br>>  > <WMT_MS_Capabilities<br>> version="1.1.1"><Service><Name>OGC:WMS</Name><Title>no<br>>  > title set, add some in metadata</Title><OnlineResource<br>>  ><br>> xlink:href="<a href="http://localhost/mapcache" target="_blank">http://localhost/mapcache</a>?"/></Service><Capability><Request><GetCapabilities><Format>application/vnd.ogc.wms_xml</Format><DCPType><HTTP><Get><OnlineResource<br>>  ><br>> xlink:href="<a
 href="http://localhost/mapcache" target="_blank">http://localhost/mapcache</a>?"/></Get></HTTP></DCPType></GetCapabilities><GetMap><Format>image/png</Format><Format>image/jpeg</Format><DCPType><HTTP><Get><OnlineResource<br>>  ><br>> xlink:href="<a href="http://localhost/mapcache" target="_blank">http://localhost/mapcache</a>?"/></Get></HTTP></DCPType></GetMap><GetFeatureInfo><Format>text/plain</Format><Format>application/vnd.ogc.gml</Format><DCPType><HTTP><Get><OnlineResource<br>>  ><br>> xlink:href="<a href="http://localhost/mapcache"
 target="_blank">http://localhost/mapcache</a>?"/></Get></HTTP></DCPType></GetFeatureInfo></Request><Exceptions><Format>text/plain</Format></Exceptions><VendorSpecificCapabilities><TileSet><SRS>EPSG:4326</SRS><BoundingBox<br>>  > SRS="EPSG:4326" minx="-180.000000" miny="-90.000000" maxx="180.000000"<br>>  > maxy="90.000000"/><Resolutions>0.70312500000000000000<br>> 0.35156250000000000000<br>>  > 0.17578125000000000000 0.08789062500000000000 0.04394531250000000000<br>>  > 0.02197265625000000000 0.01098632812500000000 0.00549316406250000000<br>>  > 0.00274658203125000000 0.00137329101562500000 0.00068664550781250000<br>>  > 0.00034332275390625000 0.00017166137695312500 0.00008583068847656250<br>>  > 0.00004291534423828120 0.00002145767211914060 0.00001072883605957030<br>>  >
 0.00000536441802978516<br>>  ><br>> </Resolutions><Width>256</Width><Height>256</Height><Format>image/png</Format><Layers>test</Layers><Styles/></TileSet></VendorSpecificCapabilities><Layer><Name>rootlayer</Name><Title>no<br>>  > title set, add some in<br>>  ><br>> metadata</Title><SRS>EPSG:900913</SRS><SRS>EPSG:4326</SRS><SRS>EPSG:3857</SRS><Layer<br>>  > cascaded="1" queryable="0"><Name>test</Name><LatLonBoundingBox<br>>  > minx="-180.000000" miny="-90.000000" maxx="180.000000"<br>>  > maxy="90.000000"/><BoundingBox SRS="EPSG:4326" minx="-180.000000"<br>>  > miny="-90.000000" maxx="180.000000"<br>>  > maxy="90.000000"/><SRS>EPSG:4326</SRS><BoundingBox
 SRS="EPSG:900913"<br>>  > minx="-20037508.342789" miny="-20037508.342789" maxx="20037508.342789"<br>>  ><br>> maxy="20037508.342789"/><SRS>EPSG:900913</SRS><SRS>EPSG:3857</SRS></Layer></Layer></Capability></WMT_MS_Capabilities><br>>  ><br>>  ><br>>  ><br>>  ><br>>  > Thanks in advance<br>>  ><br>>  > _______________________________________________<br>>  > mapserver-users mailing list<br>>  > <a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a> <mailto:<a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br>>  > <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>>  ><br>><br>><br>><br>><br>> _______________________________________________<br>> mapserver-users mailing list<br>> <a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>><br><br>_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br><br><br> </div> </div>  </div></body></html>