I tried your suggestion and it worked.<br><br>I have yet to learn more about &quot;changing the location definition to include all and only the<br>  requests you want handled this way.&quot;<br><br>Thanks<br>
<br><div class="gmail_quote">On 9 October 2010 11:12, Francis Daly <span dir="ltr">&lt;<a href="mailto:francis@daoine.org">francis@daoine.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Fri, Oct 08, 2010 at 09:10:27PM +0100, Frank Church wrote:<br>
&gt; On 8 October 2010 16:55, Francis Daly &lt;<a href="mailto:francis@daoine.org">francis@daoine.org</a>&gt; wrote:<br>
&gt; &gt; On Fri, Oct 08, 2010 at 04:02:48PM +0100, Frank Church wrote:<br>
<br>
Hi there,<br>
<br>
</div>&gt; &gt; &gt; With nginx instead of executing spidersample.cgi it treats<br>
<div class="im">&gt; &gt; &gt; spidersample.cgi/hello as meaning a hello file in a spidersample.cgi<br>
&gt; &gt; &gt; directory, and returns with a 404 error as there is no such directory.<br>
<br>
</div>&gt; &gt; &gt;         location ~ \.cgi$ {<br>
<div class="im"><br>
&gt; &gt; Your request for &quot;/spidersample.cgi/hello&quot; doesn&#39;t match, and so doesn&#39;t<br>
&gt; &gt; use this config.<br>
<br>
</div><div class="im">&gt; I removed the &quot;$&quot; and now this is the error message I get:<br>
&gt;<br>
&gt; 2010/10/08 21:06:46 [error] 14628#0: *22 FastCGI sent in stderr: &quot;Cannot<br>
&gt; chdir to script directory<br>
&gt; (/home/rchurch/Data/Lazarus/CgiApps/spidersample.cgi)&quot; while reading<br>
&gt; response header from upstream, client: 127.0.0.1, server: localhost,<br>
&gt; request: &quot;GET /spidersample.cgi/hello HTTP/1.1&quot;, upstream:<br>
&gt; &quot;fastcgi://unix:/tmp/rchurch_cgi.sock:&quot;, host: &quot;localhost:8118&quot;, referrer: &quot;<br>
&gt; <a href="http://localhost:8118/spidersample.cgi" target="_blank">http://localhost:8118/spidersample.cgi</a>&quot;<br>
<br>
</div>That suggests that this location block is now being used<br>
for this request, which is good. The error is because the<br>
fastcgi processor was told that the SCRIPT_FILENAME was<br>
/home/rchurch/Data/Lazarus/CgiApps/spidersample.cgi/hello,<br>
which is untrue. SCRIPT_FILENAME is<br>
&quot;/home/rchurch/Data/Lazarus/CgiApps/spidersample.cgi&quot;.<br>
<br>
Also, the script itself almost certainly uses PATH_INFO to determine<br>
which module of its own to use -- &quot;hello&quot;, &quot;echo&quot;, or some other --<br>
so you&#39;ll want to set that too.<br>
<br>
The easiest way to do both is probably to use fastcgi_split_path_info. See<br>
the two new lines below that include the string &quot;path_info&quot;.<br>
<br>
Note -- it is possible that all of the fastcgi_param lines are unnecessary<br>
if they are already in the included /etc/nginx/fastcgi_params. You can<br>
experiment with removing them at leisure.<br>
<br>
<br>
    location ~ \.cgi {<br>
            fastcgi_split_path_info (.*\.cgi)(/.*);<br>
<div class="im">            include /etc/nginx/fastcgi_params;<br>
            fastcgi_pass unix:/tmp/sysman_cgi.sock;<br>
</div>            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>
<div class="im">            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>
</div>            fastcgi_param  PATH_INFO        $fastcgi_path_info;<br>
<div class="im">    }<br>
<br>
<br>
&gt; &gt; Then you can change the location definition to include all and only the<br>
&gt; &gt; requests you want handled this way.<br>
<br>
</div>That bit should still be done.<br>
<br>
All the best,<br>
<div><div></div><div class="h5"><br>
        f<br>
--<br>
Francis Daly        <a href="mailto:francis@daoine.org">francis@daoine.org</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a><br>