<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#3333FF" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 22/05/2014 19:32, Valentin V.
Bartenev wrote:<br>
</div>
<blockquote cite="mid:2867528.OB7pURQ5X2@vbart-workstation"
type="cite">
<pre wrap="">On Thursday 22 May 2014 16:26:54 Phil Knight wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi
We are having an issue passing data to CGI scripts via PATH_INFO
environment variable.
for example:-
<a class="moz-txt-link-freetext" href="http://domain.com/cgi-bin/script.cgi/=">http://domain.com/cgi-bin/script.cgi/=</a>
On various apache servers this works fine and the PATH_INFO variable
will contain "/=", on our nginx server we are getting a 403 forbidden
error. We are using fcgiwrap [1] for running CGI and .cgi scripts are
executing.
Could this be an issue with nginx configuration?
</pre>
</blockquote>
<pre wrap="">[..]
Most likely this is an issue with the configuration.</pre>
</blockquote>
<br>
I think the relevant part is here:<br>
<br>
location /cgi-bin/ {<br>
root /users/folder;<br>
gzip off;<br>
fastcgi_pass unix:/var/run/fcgiwrap.socket;<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 SCRIPT_NAME $fastcgi_script_name;<br>
fastcgi_param PATH_INFO $fastcgi_path_info;<br>
fastcgi_param REQUEST_URI $request_uri;<br>
fastcgi_param DOCUMENT_URI $document_uri;<br>
fastcgi_param SERVER_PROTOCOL $server_protocol;<br>
fastcgi_param GATEWAY_INTERFACE CGI/1.1;<br>
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;<br>
fastcgi_param REMOTE_ADDR $remote_addr;<br>
fastcgi_param REMOTE_PORT $remote_port;<br>
fastcgi_param SERVER_ADDR $server_addr;<br>
fastcgi_param SERVER_PORT $server_port;<br>
fastcgi_param SERVER_NAME $server_name;<br>
<br>
fastcgi_param DOCUMENT_ROOT
/users/folder/cgi-bin/;<br>
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;<br>
fastcgi_connect_timeout 120;<br>
fastcgi_send_timeout 120;<br>
fastcgi_read_timeout 120;<br>
}<br>
<br>
I could be wrong. Any pointers would be very much appreciated.<br>
<br>
I've noticed that:<br>
<pre wrap=""><a class="moz-txt-link-freetext" href="http://domain.com/cgi-bin/no_existent_script.cgi">http://domain.com/cgi-bin/no_existent_script.cgi</a></pre>
Also gives a 403. So I suspect that nginx is looking for a file
called = in a folder named api.cgi/<br>
I'm not sure what configuration we need to do to fix this.<br>
<br>
<br>
Lyle<br>
<br>
<blockquote cite="mid:2867528.OB7pURQ5X2@vbart-workstation"
type="cite">
<pre wrap="">Actually nginx knows nothing about CGI and it's environment variables
(including PATH_INFO), so you are free to set it any value you think
reasonable.
wbr, Valentin V. Bartenev
_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a>
</pre>
</blockquote>
<br>
</body>
</html>