[Ur] mod_fcgid and Ur/Web

Edward Z. Yang ezyang at MIT.EDU
Thu May 3 11:03:42 EDT 2012


Because you're using the FastCgiServer directive, you are using
mod_fastcgi, *not* mod_fcgid. (This directive is only available
for the former.  Also, it is not a valid directive in .htaccess)
It would be a godo thing to have a story for mod_fcgid, since
it is the "real" FastCGI module endorsed by Apache.

Getting the web server to pass exactly the right path format
is exactly the problem here.  The convention for FastCGI deployment
is that you setup some mod_rewrite rules which rewrite:

    /internal/path

to

    /script.fcgi/internal/path

The FastCGI itself sees the second path, and essentially every
other FastCGI application knows that it should refer to PATH_INFO
(which is equal to /internal/path) not REQUEST_URI (which is
/scripts.fcgi/internal/path) for routing.

Edward

Excerpts from Adam Chlipala's message of Thu May 03 10:39:06 -0400 2012:
> Edward Z. Yang wrote:
> > Has anyone on this list gotten Ur/Web to work with mod_fcgid,
> > using only .htaccess available directives?  (I keep getting
> > 404 errors in the error log, even when I try rewriting
> > the paths.)
> 
> I run all the demos on www.impredicative.com using FastCGI in Apache, 
> though I don't remember which module I'm using.  It's the one that adds 
> the 'FastCgiServer' directive, and the manual documents how to make such 
> things work.
> 
> Getting things to work properly with an arbitrary module shouldn't be 
> complicated.  You just have to get the web server to pass the 
> application URI's in exactly the format it would get if you had compiled 
> a standalone web server.
> 
> If you can point to a small set of short source and configuration files 
> that illustrates the problem, I may be able to offer more specific advice.
> 



More information about the Ur mailing list