nginx serving R scripts via CGI/FastRWeb

Francis Daly francis at
Wed Feb 20 13:25:04 UTC 2013

On Wed, Feb 20, 2013 at 10:00:04AM +0000, Stefan Parvu wrote:

> > Something like (untested by me!)
> >   location ^~ /cgi-bin/R/ { }

> yep correct. I do have now on cgi-bin directory a binary file called: R.
> I did change my nginx.conf to have a new location definition for the 
> R calls, like here:
>         location ~ ^/cgi-bin/R$ {

"~" means "regex".

"^" means "start of string".

"$" means "end of string".

This location will only match requests that are




and not


> But when I try: http://localhost:9001/cgi-bin/R/foo?n=50
> this returns with same error that there is no such directory, seems somehow
> the request it is not passed via CGI to FastWebR.

Yes, that's what you configured.

What happens when you test exactly what was suggested?

Francis Daly        francis at

More information about the nginx mailing list