[mapserver-users] MapCache 1.2.0 and NGNIX 1.5 problem

Pascual Ayats, Victor victor.pascual at icc.cat
Fri Oct 4 00:38:12 PDT 2013


Hi users,

I compiled and installed MapServer 6.4 and MapCache 1.2 as fastcgi in a Linux Red Hat 6 (64 bits)

I compiled NGNIX 1.5 (adding MapCache as a module) and installed fcgiwarp and spanw-fcgi in order to run fastcgi in NGNIX.

MapServer works very well and fast but I have a problem dealing with MapCache. MapCahce works well in GetCapbilities requests or when already existing tiles in the file system pre generated by mapcacahe_seed , but when I send a request and the tile not exist  then I received a "403 Forbbiden" error.

So MapCache "fails" when try to generate a tile on the fly.

The 403 Forbbiden error not comes from NGINX (not appear in error log), so it seems that the error comesfrom the spanw-cgi process or Mapcahe .fcgi??
I have no idea what might happen and who to solve it

Here's the spanw-fcgi config

FCGI_SOCKET=/var/run/fcgiwrap.socket
FCGI_PROGRAM=/usr/local/sbin/fcgiwrap
FCGI_USER=nginx
FCGI_GROUP=nginx
FCGI_EXTRA_OPTIONS="-M 0777"
OPTIONS="-u $FCGI_USER -g $FCGI_GROUP -s $FCGI_SOCKET -S $FCGI_EXTRA_OPTIONS -F 1 -P /var/run/spawn-fcgi.pid -- $FCGI_PROGRAM"

Here's the nginx .conf

#Mapserver
  location /maps/ {
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

#Mapcache
   location ~ ^/mapcache(?<path_info>/.*|$) {
         set $url_prefix "/mapcache";
         mapcache /opt/geo/data/mapcache/mapcache.xml;
         error_page 404 = @fcgi_mapcache;

      }

  #MapCache 404
   location @fcgi_mapcache {
      fastcgi_pass unix:/var/run/fcgiwrap.socket;
      include fastcgi_params;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

Any help will be greatly appreciated

Best regards

Victor Pascual Ayats



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20131004/6a60f9b1/attachment-0001.html>


More information about the mapserver-users mailing list