[GIS] Mapserver – Error setting up simple WMS/Mapcache service

mapserverwms

I've got a Ubuntu 12.04 computer with Mapserver and all other software on it. I have tried to set up a simple WMS / Mapcache service but have not succeeded. I can browse to the automatically generated demo page, and they work per se, but all I get are red tiles (i.e. broken)

I think there's something wrong in the configuration files, regarding referencing map or layers.

Mapcache.xml: http://paste.org/67836

simple.map: http://paste.org/67837

I get this error message:

[Mon Oct  7 15:41:30 2013].708630 msWMSLoadGetMapParams(): WMS server error. Invalid     layer(s) given in the LAYERS parameter. A layer might be disabled for this     request. Check wms/ows_enable_request settings.
[Mon Oct  7 15:41:30 2013].708691 mapserv request processing time (msLoadMap not     incl.): 0.000s
[Mon Oct  7 15:41:30 2013].708712 msFreeMap(): freeing map at 0x18fa670.

Best Answer

I just tried your configuration and it worked for me, both the mapfile and the mapcache config. I suspect that your mapcache is not configured properly with the mapcache.xml.

Since you did get an error message, the request is sent to MapServer and it simply doesn't find your layer in the mapfile. Please make sure you point to the right mapfile in the mapcache config and that your mapcache config is correctly configured in Apache:

http://mapserver.org/mapcache/install.html

Note that each time you modify the MapCache config, you need to restart Apache since it runs (usually) as a module.