httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artur Signell <ar...@surfnet.fi>
Subject Re: [users@httpd] Suexec and apache 2.0.46 - scripts not run with suexec
Date Thu, 19 Jun 2003 10:42:48 GMT
On Thu, 19 Jun 2003, Zac Stevens wrote:

> On Thu, Jun 19, 2003 at 12:25:04PM +0300, Artur Signell wrote:
> > Suexec is working properly and apache is built with  
> > --with-suexec-userdir=cgi-bin. In fact if I skip the rewrite rule and
> > add a symlink: /home/username/html/cgi-bin -> /home/username/cgi-bin 
> > the script is executed with suexec as the user. But this method is not 
> > possible to use in my case.
> 
> Sorry, I see what you're saying now - and it's worth noting that this is
> really a problem with mod_rewrite, not suexec.  You may want to try adding
> the 'PT' option to your RewriteRule, as it seems to be applicable to your
> case.  
> 
> Failing that, turn up RewriteLogLevel (and define a RewriteLog if you don't 
> have one) to get a detailed breakdown of the steps taken in processing the 
> rewrite - this can often help pinpoint where things are going wrong.
> 

It might be a problem with suexec, it might be a problem with mod_rewrite. 
The problem is not that the rewrite doesn't work, the problem is that 
after the rewrite suexec isn't used for executing the cgi.

The rewrite works well (without [PT]), log entries below: 

(2) init rewrite engine with requested uri /~artur/cgi-bin/abc.cgi
(3) applying pattern '/~([^/]*)/cgi-bin/(.*)' to uri 
'/~artur/cgi-bin/abc.cgi'
(2) rewrite /~artur/cgi-bin/abc.cgi -> /home/artur/cgi-bin/abc.cgi

Cgi is executed and page is displayed, but is run as "apache" user.



When adding [PT] to the rewrite rule:

(2) forcing '/home/artur/cgi-bin/abc.cgi' to get passed through to next 
API URI-to-filename handler

I just get an error page and the error log tells that the webserver is now 
looking in the document-root (/var/www/html) for the file, stripping the 
first slash for some reason.

[error] [client x.x.x.x] File does not exist: /var/www/html/home


Artur

> 
> 
> Zac
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message