LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-18-2003, 02:46 PM   #1
heilpern
LQ Newbie
 
Registered: May 2003
Posts: 4

Rep: Reputation: 0
apache2 + .pl files?


I am running apache2 (as installed through a fresh Mandrake 9.1 distribution), and am having a problem I am unsire how to solve.

I am making a website using the WebGUI CMS package, which uses a file called "index.pl" as its entrypoint. When I open this page, rather than have that .pl file executed, I am shown it as if it is text.

Quote:
# rpm -qa | grep apache
apache2-2.0.44-11mdk
apache2-common-2.0.44-11mdk
apache2-modules-2.0.44-11mdk
apache2-mod_perl-2.0.44_1.99_08-3mdk
apache2-mod_php-2.0.44_4.3.1-2mdk
apache2-mod_ssl-2.0.44-11mdk
apache2-mod_suexec-2.0.44-2mdk
apache-conf-2.0.44-11mdk
The install directions for WebGUI says I should add the following to my vhost definition:
Quote:
<Files ~ "\.(pl)$">
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
</Files>
However, as seen here, I'm not getting much luck.
Quote:
# /etc/rc.d/init.d/httpd start
Starting httpd2: Syntax error on line 55 of /etc/httpd/2.0/conf/vhosts/Vhosts.conf:
Invalid command 'PerlHandler', perhaps mis-spelled or defined by a module not included in the server configuration
My complete vhost entry is:
Quote:
NameVirtualHost 209.187.140.238
<VirtualHost 209.187.140.238>
ServerName www.acmebackflow.com
ServerAlias acmebackflow.com
ServerPath /var/www
DocumentRoot /var/www/AcmeBackflow
ErrorLog /var/log/httpd/acme-error-log
<Files ~ "\.(pl)$">
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
</Files>
</VirtualHost>
Can anyone try to get me pointed in the right direction with this? The closest I've come... I -think- the <Files> section there is perhaps valid for Apache 1.3 but not for 2.0, however I am unsire what to change. Configuring Apache definitely is not my strong point.
 
Old 09-11-2003, 10:58 AM   #2
devinhedge
LQ Newbie
 
Registered: Sep 2003
Location: Cullman, AL
Distribution: Mandrake 9.1
Posts: 1

Rep: Reputation: 0
ok.
It's not just you. I get the same thing. I too am installing WebGUI under a vHost.

My configuration is slightly different...

<VirtualHost 192.168.1.25>
DocumentRoot /home/WebGUI/public_html/
ServerName WebGUI.devenv.net
Options ExecCGI FollowSymLinks
User apache
Group apache
<IfModule mod_dir.c>
DirectoryIndex index.html index.pl
</IfModule>
SetHandler perl-script
PerlHandler Apache::Registry
HostnameLookups On
ErrorLog /home/WebGUI/logs/error_log
CustomLog /home/WebGUI/logs/access_log common
</VirtualHost>

...but I get the same error:
$> apachectl configtest
Checking configuration sanity for Apache 1.3: Syntax error on line 12 of /etc/httpd/conf/vhosts/bizeserv.conf:
Invalid command 'PerlHandler', perhaps mis-spelled or defined by a module not included in the server configuration [ FAILED ]
Checking configuration sanity for Apache 1.3/mod_perl (running in proxied mode): [ OK ]

I'm going over to WebGUI's site to see if any else is having this problem.

Devin.
 
Old 08-28-2004, 11:22 AM   #3
unixmad
Member
 
Registered: Aug 2004
Posts: 47

Rep: Reputation: 15
same error

Im also getting the same or a very similar error, [warn] module php4_module is already loaded, skippingSyntax error on line 299 of /etc/httpd/conf/httpd.conf:
Invalid command 'ExecCGI', perhaps mis-spelled or defined by a module not included in the server configuration

If you find a solution could you let me know if thats okay

Thanks
David
 
Old 08-28-2004, 12:04 PM   #4
madluther
Member
 
Registered: Aug 2004
Distribution: LFS
Posts: 349

Rep: Reputation: 30
Heilpern,

Some example syntax differences between apache2 and 1.3

1.3 example

<Location /foo>

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

apache2 example

<Location /foo>

SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI
PerlOptions +ParseHeaders
</Location>


HTH

Mad.
 
Old 08-28-2004, 12:19 PM   #5
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
well, there is a line in apache 2 to where you tell apache what files to treat as cgi by extension in your httpd.conf file.

there's an AddHandler cgi-script line. mines around line 860 and it looks like:

AddHandler cgi-script .cgi .pl

this tells apache to execute resource requests for *.cgi and *.pl files.
 
Old 08-28-2004, 12:26 PM   #6
unixmad
Member
 
Registered: Aug 2004
Posts: 47

Rep: Reputation: 15
Hi im new so i shall probably hit some other problems but anyway thanks a bunch m8, thats got rid of that error ...... great

Basically the original config I had that was generating an ERROR was

<Directory "/var/www/html">

Options Indexes FollowSymLinks
+ExecCGI MultiViews <----------------This was the error
AllowOverride None
Order allow,deny
Allow from all
</Directory>

To fix I did

<Directory "/var/www/html">

Options Indexes FollowSymLinks +ExecCGI MultiViews <----------- Notice that now ExecCGI is on the options line .... silly me :-)
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Cheers
David
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 cannot execute cgi files on a USB drive bhoult Linux - Software 2 07-11-2005 10:19 AM
apache2 missing config files c-- Ubuntu 5 06-20-2005 08:24 PM
Where are the Apache2 Files... darkarcon2015 Slackware 4 01-30-2005 07:15 PM
Upload Files in Apache2.... vous Linux - Software 0 02-03-2004 07:51 AM
Apache2 CGI-Perl will not read files fefeh Linux - Software 0 06-30-2003 08:07 PM


All times are GMT -5. The time now is 10:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration