Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

cgi vs. mod_perl & other oddities

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  externalising <virtual host> directives  
Author Message
evilninja

External


Since: Jul 01, 2003
Posts: 4



(Msg. 1) Posted: Thu Jul 03, 2003 8:37 pm
Post subject: cgi vs. mod_perl & other oddities
Archived from groups: alt>apache>configuration (more info?)

hi,

i'm in need of some help because i am a bit confused about some apache
features i need or believe to need.

actually, the problem is occuring to a friend of mine, he needs to
execute scripts in a suid-user manner. a script in a /cgi-bin/ with 4755
permissions is wrtiting files into a directory within VirtualHost
(e.g. /var/www/www.domain.com/new/file.html), and these files should not
be owned by the Apache user, but by the owner of the scripts.

so, here on my site, all works fine. the friend is not allowed to make
use of suEXEC. his apache has mod_perl compiled-in, but no perl-handler
is set, the only thing i see in his httpd.conf is

<IfModule mod_perl.c>
<Files ~ (\.asp)>
SetHandler perl-script
PerlModule Apache::ASP
PerlHandler Apache::ASP
PerlSetVar Global .
PerlSetVar StateDir /tmp/asp
</Files>
</IfModule>

which is about .asp only, right?

so i tried to find out, what actually is responsible for executing .pl
scripts. without mod_perl enabled (here, at my site), it is
/usr/bin/perl, without /usr/bin/perl no .pl script is executed.

but i don't get it with these lines:

#AddHandler perl-script .pl

# To use CGI scripts:
#AddHandler cgi-script .cgi

yes, even with these lines disabled, .cgi files and .pl are still
executed, because they are located in the /cgi-bin/ .

after all, i think that my friend's /usr/bin/perl would not allow
suid-user scripts (i mean: scripts with 4755, owned by some *user*).
given that, what is needed to give .pl scripts to mod_perl ?

i have tried this, found that in my mod_perl docs:

<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>

but this is not working here, even with the

AddHandler perl-script .pl

enabled. no attempt is made to execute .pl scripts, sometimes the
browser tries to download this.
the above <Location /perl> is not fine anyway, i'd prefer to have .pl
and .cgi scripts in the same directory, so i adjusted the line to
<Location /cgi-bin>

i'll keep trying around, but maybe you have some thoughts on it, hints
or even more "Suggested Readings".
usually i get things working after enough RTFM, but this mod_perl make
me mad already, very confusing.

Thank you,
Christian.

PS: this all is with apache 1.3.26 on Debian/powerpc repectively apache
1.3.27 on Redhat/i386. more info available on request of course.

--
BOFH excuse #443:

Zombie processess detected, machine is haunted.

 >> Stay informed about: cgi vs. mod_perl & other oddities 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
mod_perl vs. cgi, suid-perl (long) - hi, i'm in need of some help because i am a bit confused about some apache features i need or believe to need. actually, the problem is occuring to a friend of mine, he needs to execute scripts in a suid-user manner. a script in a /cgi-bin/ with 4755...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]