<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Umm...<br>
<br>
 I checked it and  Selinux= disable<br>
<br>
<br>
Thanks any way!!<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF769648"><font color="#000000" face="Tahoma" size="2"><b>De:</b> Umberto Nicoletti [umberto.nicoletti@gmail.com]<br>
<b>Enviat el:</b> dimecres, 9 / octubre / 2013 13:17<br>
<b>Per a:</b> Pascual Ayats, Victor<br>
<b>A/c:</b> thomas bonfort; mapserver<br>
<b>Tema:</b> Re: [mapserver-users] MapCache 1.2.0 and NGNIX 1.5 problem<br>
</font><br>
</div>
<div></div>
<div>
<p dir="ltr">Perhaps SELinux is enabled and blocking mapcache fs operatios?</p>
<div class="gmail_quote">On Oct 9, 2013 12:46 PM, "Pascual Ayats, Victor" <<a href="mailto:victor.pascual@icc.cat" target="_blank">victor.pascual@icc.cat</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
OK, I upgrade nginx.conf to<br>
<br>
 location @fcgi_mapcache {<br>
<br>
   fastcgi_param  QUERY_STRING     $query_string;<br>
   fastcgi_param  REQUEST_METHOD   $request_method;<br>
   fastcgi_param  CONTENT_TYPE     $content_type;<br>
   fastcgi_param  CONTENT_LENGTH   $content_length;<br>
   fastcgi_param  PATH_INFO        $path_info;<br>
   fastcgi_param  SERVER_NAME      $server_name;<br>
   fastcgi_param  SERVER_PORT      $server_port;<br>
   fastcgi_param  SCRIPT_NAME      "/mapcache";<br>
   fastcgi_pass unix:/var/run/fcgiwrap.socket;<br>
      }<br>
<br>
<br>
I restart nginx, and the error is exactly the same<br>
<br>
********************************************************************<br>
fstat(1, {st_dev=makedev(0, 8), st_ino=30335, st_mode=S_IFIFO|0600, st_nlink=1, st_uid=502, st_gid=502, st_blksize=4096, st_blocks=0, st_size=0, st_atime=2013/10/09-11:26:39, st_mtime=2013/10/09-11:26:39, st_ctime=2013/10/09-11:26:39}) = 0<br>
2932  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc9c4488000<br>
2932  write(1, "Status: 403 Forbidden\r\nContent-Type: text/plain\r\n\r\n403 Forbidden\r\n", 66 <unfinished ...><br>
2930  <... select resumed> )            = 1 (in [6])<br>
2930  read(6, "Status: 403 Forbidden\r\nContent-Type: text/plain\r\n\r\n403 Forbidden\r\n", 4096) = 66<br>
2930  select(9, [6 8], NULL, NULL, NULL <unfinished ...><br>
2932  <... write resumed> )             = 66<br>
2932  write(2, "Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?", 112 <unfinished ...><br>
2930  <... select resumed> )            = 1 (in [8])<br>
2930  read(8, "Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?", 4096) = 112<br>
2930  write(2, "Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?", 112) = 112<br>
2930  select(9, [6 8], NULL, NULL, NULL <unfinished ...><br>
**************************************************************************************************************<br>
<br>
Continue searching.......<br>
<br>
Regards<br>
<br>
Victor<br>
________________________________________<br>
De: thomas bonfort [<a href="mailto:thomas.bonfort@gmail.com" target="_blank">thomas.bonfort@gmail.com</a>]<br>
Enviat el: dimecres, 9 / octubre / 2013 10:41<br>
Per a: Pascual Ayats, Victor<br>
A/c: <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
Tema: Re: [mapserver-users] MapCache 1.2.0 and NGNIX 1.5 problem<br>
<br>
well, try setting script_name:<br>
<br>
fastcgi_param  SCRIPT_NAME      "/mapcache";<br>
<br>
also make sure PATH_INFO is set as it is needed by mapcache. iirc<br>
fastcgi_params did not include it by default at one point.<br>
<br>
fastcgi_param  PATH_INFO        $path_info;<br>
<br>
--<br>
thomas<br>
<br>
On 9 October 2013 10:31, Pascual Ayats, Victor <<a href="mailto:victor.pascual@icc.cat" target="_blank">victor.pascual@icc.cat</a>> wrote:<br>
> Thanks for the point,<br>
><br>
> Indeed, using  strace command, I created a debug LOG to spawn-FGC and saw this:<br>
><br>
> 22419 rt_sigaction(SIGPIPE, {SIG_DFL, [PIPE], SA_RESTORER|SA_RESTART, 0x3259032920}, {0x35d0006290, [], SA_RESTORER, 0x3259032920}, 8) = 0<br>
> 22419 fstat(1, {st_dev=makedev(0, 8), st_ino=160933, st_mode=S_IFIFO|0600, st_nlink=1, st_uid=502, st_gid=502, st_blksize=4096, st_blocks=0, st_size=0, st_atime=2013/10/09-07:51:04, st_mtime=2013/10/09-07:51:04, st_ctime=2013/10/09-07:51:04}) = 0<br>
> 22419 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb6d96f6000<br>
> 22419 write(1, "Status: 403 Forbidden\r\nContent-Type: text/plain\r\n\r\n403 Forbidden\r\n", 66 <unfinished ...><br>
> 22415 <... select resumed> )            = 1 (in [6])<br>
> 22415 read(6, "Status: 403 Forbidden\r\nContent-Type: text/plain\r\n\r\n403 Forbidden\r\n", 4096) = 66<br>
> 22415 select(9, [6 8], NULL, NULL, NULL <unfinished ...><br>
> 22419 <... write resumed> )             = 66<br>
> 22419 write(2, "Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?", 112 <unfinished ...><br>
> 22415 <... select resumed> )            = 1 (in [8])<br>
> 22415 read(8, "Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?", 4096) = 112<br>
> 22415 write(2, "Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?", 112) = 112<br>
> 22415 select(9, [6 8], NULL, NULL, NULL <unfinished ...><br>
> 22419 <... write resumed> )             = 112<br>
> 22419 write(2, "\n", 1 <unfinished ...><br>
> 22415 <... select resumed> )            = 1 (in [8])<br>
> 22415 read(8, "\n", 4096)               = 1<br>
> 22415 write(2, "\n", 1)                 = 1<br>
> 22415 select(9, [6 8], NULL, NULL, NULL <unfinished ...><br>
> 22419 <... write resumed> )             = 1<br>
> 22419 exit_group(99)                    = ?<br>
> 22415 <... select resumed> )            = 1 (in [6])<br>
> 22415 read(6, "", 4096)                 = 0<br>
> 22415 close(6)                          = 0<br>
> 22415 select(9, [8], NULL, NULL, NULL)  = 1 (in [8])<br>
> 22415 read(8, "", 4096)                 = 0<br>
> 22415 close(8)                          = 0<br>
> 22415 write(3, "\1\6\0\1\0B\6\0Status: 403 Forbidden\r\nContent-Type: text/plain\r\n\r\n403 Forbidden\r\n\0\0\0\0\0\0\1\6\0\1\0\0\0\0\1\3\0\1\0\10\0\0\0\0\0\0\0\0\0\0", 104) = 104<br>
> 22415 shutdown(3, 1 /* send */)         = 0<br>
> 22415 select(4, [3], NULL, NULL, {2, 0}) = 1 (in [3], left {1, 999997})<br>
> 22415 read(3, "", 1024)                 = 0<br>
> 22415 close(3)                          = 0<br>
> 22415 accept(0,<br>
><br>
><br>
> I Google the error "Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?"  and there's not a clean response or solution.<br>
><br>
><br>
> So if you have any clue or idea to continue move forward I'll be very grateful.<br>
><br>
> Thanks in advance<br>
><br>
><br>
><br>
> Victor<br>
><br>
><br>
> ________________________________________<br>
> De: thomas bonfort [<a href="mailto:thomas.bonfort@gmail.com" target="_blank">thomas.bonfort@gmail.com</a>]<br>
> Enviat el: divendres, 4 / octubre / 2013 10:00<br>
> Per a: Pascual Ayats, Victor<br>
> A/c: <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
> Tema: Re: [mapserver-users] MapCache 1.2.0 and NGNIX 1.5 problem<br>
><br>
> You might want to check the spawn-fcgi logs. Note that there is no<br>
> place in the mapcache code that emits a 403 error, i.e. that 403 is<br>
> coming from something else than mapcache.<br>
><br>
> --<br>
> thomas<br>
><br>
> On 4 October 2013 09:38, Pascual Ayats, Victor <<a href="mailto:victor.pascual@icc.cat" target="_blank">victor.pascual@icc.cat</a>> wrote:<br>
>> Hi users,<br>
>><br>
>><br>
>><br>
>> I compiled and installed MapServer 6.4 and MapCache 1.2 as fastcgi in a<br>
>> Linux Red Hat 6 (64 bits)<br>
>><br>
>><br>
>><br>
>> I compiled NGNIX 1.5 (adding MapCache as a module) and installed fcgiwarp<br>
>> and spanw-fcgi in order to run fastcgi in NGNIX.<br>
>><br>
>><br>
>><br>
>> MapServer works very well and fast but I have a problem dealing with<br>
>> MapCache. MapCahce works well in GetCapbilities requests or when already<br>
>> existing tiles in the file system pre generated by mapcacahe_seed , but when<br>
>> I send a request and the tile not exist  then I received a “403 Forbbiden”<br>
>> error.<br>
>><br>
>><br>
>><br>
>> So MapCache “fails” when try to generate a tile on the fly.<br>
>><br>
>><br>
>><br>
>> The 403 Forbbiden error not comes from NGINX (not appear in error log), so<br>
>> it seems that the error comesfrom the spanw-cgi process or Mapcahe .fcgi??<br>
>><br>
>> I have no idea what might happen and who to solve it<br>
>><br>
>><br>
>><br>
>> Here’s the spanw-fcgi config<br>
>><br>
>><br>
>><br>
>> FCGI_SOCKET=/var/run/fcgiwrap.socket<br>
>><br>
>> FCGI_PROGRAM=/usr/local/sbin/fcgiwrap<br>
>><br>
>> FCGI_USER=nginx<br>
>><br>
>> FCGI_GROUP=nginx<br>
>><br>
>> FCGI_EXTRA_OPTIONS="-M 0777"<br>
>><br>
>> OPTIONS="-u $FCGI_USER -g $FCGI_GROUP -s $FCGI_SOCKET -S $FCGI_EXTRA_OPTIONS<br>
>> -F 1 -P /var/run/spawn-fcgi.pid -- $FCGI_PROGRAM"<br>
>><br>
>><br>
>><br>
>> Here’s the nginx .conf<br>
>><br>
>><br>
>><br>
>> #Mapserver<br>
>><br>
>>   location /maps/ {<br>
>><br>
>> fastcgi_pass unix:/var/run/fcgiwrap.socket;<br>
>><br>
>> include fastcgi_params;<br>
>><br>
>> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>
>><br>
>> }<br>
>><br>
>><br>
>><br>
>> #Mapcache<br>
>><br>
>>    location ~ ^/mapcache(?<path_info>/.*|$) {<br>
>><br>
>>          set $url_prefix "/mapcache";<br>
>><br>
>>          mapcache /opt/geo/data/mapcache/mapcache.xml;<br>
>><br>
>>          error_page 404 = @fcgi_mapcache;<br>
>><br>
>><br>
>><br>
>>       }<br>
>><br>
>><br>
>><br>
>>   #MapCache 404<br>
>><br>
>>    location @fcgi_mapcache {<br>
>><br>
>>       fastcgi_pass unix:/var/run/fcgiwrap.socket;<br>
>><br>
>>       include fastcgi_params;<br>
>><br>
>>       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>
>><br>
>>     }<br>
>><br>
>><br>
>><br>
>> Any help will be greatly appreciated<br>
>><br>
>><br>
>><br>
>> Best regards<br>
>><br>
>><br>
>><br>
>> Victor Pascual Ayats<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> mapserver-users mailing list<br>
>> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">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>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">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>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>