httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Wilson <>
Subject [users@httpd] using CGI as DirectoryIndex with cgiwrap and rewriterules
Date Mon, 09 May 2005 17:19:10 GMT

Hi all!

I am having a small issue with a setup I am experimenting with.

I am using cgiwrap to provide my users with cgi functionality for PHP,
Perl etc (as there is a need for all CGI to run as the user who owns 
the file, hence no mod_php but running php and a CGI instead)

In order to ensure the wrappers work seamlessly, I use rewriterules to 
quietly rewrite the URLs to the wrapper, which in turn looks up the user
and runs their script - this works fine for all named scripts (i.e. 
where you specify the script filename on the URL).

I now need to support .php as a directoryindex, but the rewriterules
seem to go very strange for this case.

Following the rewritelog, I see the rules roll round in turn trying to 
add each of the directoryindex's specified in httpd.conf.  the last 
one it tries is .php, and the rules correctly generate a correct file 
path to the file, but at this point, the rewrite engine starts to 
go into a redirect state, where it them completely screws up what's
going on.

I think this is best explained if I provide both rewrite logs, the 
first for the url (which work),
and then the second for just (which relies
on apache adding the index.php from the directoryindex line in

Both logs are attatched to this mail.

the user is username and their local path to their data would be 

Can anyone shed any light as to why the rewrite rules go so whacky when 
I let apache provide the filename via DirectoryIndex?

Thanks everyone!

Gary Wilson

View raw message