Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

Re: nginx serving R scripts via CGI/FastRWeb

$
0
0
On 11:22 Tue 19 Feb , Harold Sinclair wrote:
> 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.

yeah not sure how to do it. FastRWeb tell us:

" FastRWeb consists of several parts:

Webserver-to-R pipeline, consisting of either a thin CGI or a PHP client connecting to Rserve which sources and runs the R script. The CGI client is called Rcgi and is compiled as part of the package. The PHP client is part of Rserve in the clients section.
"

So Im on option 1: CGI. The client will be this binary which somehow needs to be
executed for each R script. I placed the Rcgi under cgi.bin directory and rename it
as R.cgi.

If I call directly:

http://localhost:9001/cgi-bin/R.cgi the browser returns:
Error: no function or path specified.

http://localhost:9001/cgi-bin/R.cgi/foo.png?n=100
I see under error log:
2013/02/19 18:39:53 [error] 2847#0: *56 open() "/opt/sdr/report/docroot/cgi-bin/R.cgi/foo.png" failed (20: Not a directory), client: 127.0.0.1, server: sdrrep, request: "GET /cgi-bin/R.cgi/foo.png?n=100 HTTP/1.1", host: "localhost:9001"

stefan

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>