Current time: 11-27-2024, 10:51 AM Hello There, Guest! (LoginRegister)


Post Reply 
Perl, Suexec, Error 500 or file not found or perlfile presented for download
Author Message
just_me Offline
Newbie
*

Posts: 6
Joined: May 2011
Reputation: 0
Post: #1
Perl, Suexec, Error 500 or file not found or perlfile presented for download
Howdy,

i cam across some weird problem.

I have an ISPCP Omega installation on debian lenny, where Perl and PHP and suexec are enabled as modules, as is fastcgi.

I wanted to install a bunch of perlscripts, amaof an erp system, and i am not able to access the .pl files. Either it is Err500 or Error 403 or 403 or apache presents the .pl file for download. this is the original http conf addition, which i placed in /etc/apache2/ispcp/mydomain.com:

AddHandler cgi-script .pl
Alias /mydir/ /var/www/mydir/
<Directory /var/www/mydir>
Options ExecCGI Includes FollowSymlinks
</Directory>
<Directory /var/www/lmydir/users>
Order Deny,Allow
Deny from All
</Directory>

In the meanwhile i have tried various versions of this, finally ending up with this:
<Files ~ "\.(pl)$">
SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI
</Files>

AddHandler cgi-script .pl perl-script

Alias /lx/ /var/www/mydir/
<Directory /var/www/mydir>
AddHandler cgi-script .pl

Order Deny,Allow
Allow from All
Options +Includes +FollowSymlinks +SymLinksIfOwnerMatch
</Directory>
<Directory /var/www/mydir/users>
Order Deny,Allow
Deny from All
</Directory>

I googled around several hours, tried different things and found out the following(please be patient, if this is not correct, some information was contradictory:

1. The perlfiles in question have to belong to the user, who owns the virtual host directorey (vu2000), not apache (www-data)
2. The Websever has to be able to read/write data to the directory in question (have given him 775 for the directory and the files below.
3. The problem could be the symlinks, because suexec cannot follow them

If i enter a link for a different file within the folder in question (say a .hmtl or the favicon), it works. either one specific .pl file is being presented to download it and other .pl files create Error 500.

So, my questions finally are:

1. How can i manage to get apache to execute the various perl scripts? Where do i have to change which config inside ispcp? If i put it on a dedicated webserver, with no virtual hosts, everything is fine, but it now has to be on this virtual host ...

2. Can i disable the suexec module on just one virtual host, keeping it intact on the rest of the server? I assume suexec is a requirement for ispcp, right?

3. is there any other solution to the problem? It is not an option switching on different software.

4. can i run perl as mod-perl instead of fcgi? Would that solve the problem and how can i accomplish that?

I hope, i was able to describe the problem.

Best and thank you

w_e
(This post was last modified: 05-04-2011 10:59 PM by just_me.)
05-04-2011 10:20 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)