<div dir="ltr">Sounds like you ought to try writing a wrapper script ending in .cgi in the cgi dir that grabs the query string and hands the job off to the R executable. Not sure if R is required in the cgi-bin directory. You might have to enable symlinking out for it to work.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 19, 2013 at 9:49 AM, Stefan Parvu <span dir="ltr"><<a href="mailto:sparvu@systemdatarecorder.org" target="_blank">sparvu@systemdatarecorder.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 08:50 Tue 19 Feb     , Harold Sinclair wrote:<br>
> Does the R cgi script filename end in .cgi ? That's what you specify, it<br>
> appears.<br>
<br>
</div>No, it does not end with cgi since the R scripts will not be called directly<br>
by nginx.<br>
<br>
As I understood I should call the R scripts like: <a href="http://localhost/cgi-bin/R/foo" target="_blank">http://localhost/cgi-bin/R/foo</a> where<br>
there is a R binary file under cgi-bin which will proxy those to FastRWeb<br>
and Rserve R modules. So under cgi-bin there are no R scripts whatsoever,<br>
but they usually will go under: /opt/sdr/report/var/FastRWeb/web.R directory.<br>
<br>
Now my problem seems to be related how the R binary under cgi-bin will<br>
ever be called via CGI and further FastRWeb ... since my nginx.conf knows nada<br>
about R being called. Currently my nginx.conf is configured to run<br>
anything ending .cgi as cgi scripts ...<br>
<br>
/opt/sdr/report/docroot/cgi-bin<br>
$ ls -lrt<br>
total 60<br>
-rwxr-x--- 1 sdr sdr  3715 Feb 19 12:00 initial.cgi<br>
-rwxr-xr-x 1 sdr sdr 55932 Feb 19 13:53 R<br>
<br>
$ file R<br>
R: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x0351c94aaf487ee3559a722446865b7ae0f3b7cc, not stripped<br>
<br>
Here the R scripts:<br>
<br>
/opt/sdr/report/var/FastRWeb<br>
$ ls -lrt<br>
total 16<br>
drwxr-xr-x 2 sdr sdr 4096 Feb 18 00:08 web<br>
drwxr-xr-x 2 sdr sdr 4096 Feb 18 00:08 tmp<br>
drwxr-xr-x 2 sdr sdr 4096 Feb 19 14:27 code<br>
srw-rw-rw- 1 sdr sdr    0 Feb 19 14:27 socket<br>
=>> drwxr-xr-x 2 sdr sdr 4096 Feb 19 14:28 web.R<br>
<br>
all R scripts will go here web.R directory.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
stefan<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>