LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 03-22-2007, 07:43 PM   #1
debaire
LQ Newbie
 
Registered: May 2003
Location: Los Angeles, CA
Distribution: RHEL AS 4
Posts: 22

Rep: Reputation: 15
Apache and Perl, CGI


I've been searching for awhile and haven't found anything that works for me thus far. I just want my .pl and .cgi files to run in cgi-bin instead of just outputting the code.
Here's the kicker, everything worked fine when I was on AS3. I upgraded to AS4 and now the scripts won't run. Here's the excerpt from my httpd.conf file that is relevant. The permissions are correct on the files and the folders. I'm running Apache 2.0.52 and mod_perl-1.99_16.

First I load mod_perl. Note: I didn't have to do that before.

Code:
LoadModule perl_module /etc/httpd/modules/mod_perl.so
Starting apache without that module doesn't show mod_perl being loaded in error_log. Then,

Code:
ScriptAlias /cgi-bin/ /etc/httpd/cgi-bin/
Does cgi-bin specifically have to be in or out of DocumentRoot? I've tried both ways to no avail.

Code:
<Directory /etc/httpd/cgi-bin/>
    AllowOverride All
    Options +ExecCGI
    Order allow,deny
    Allow from all
</Directory>
Code:
        Alias /perl/ /etc/httpd/cgi-bin/
        <Location /perl>
          SetHandler perl-script
          PerlHandler Apache::Registry
          PerlSendHeader On
          Options +ExecCGI
          Allow from all
        </Location>
To use cgi anywhere

Code:
AddHandler cgi-script .cgi .pl
That's all I can find regarding CGI and Perl. Anyone notice anything I'm missing. Oh, I know AS4 has selinux implemented. For now, it's been completely disabled. iptables are allowing ports 22 and 80 only. Thanks for any help.
 
Old 03-26-2007, 12:34 PM   #2
debaire
LQ Newbie
 
Registered: May 2003
Location: Los Angeles, CA
Distribution: RHEL AS 4
Posts: 22

Original Poster
Rep: Reputation: 15
Question

No ideas?
 
Old 03-28-2007, 10:27 AM   #3
debaire
LQ Newbie
 
Registered: May 2003
Location: Los Angeles, CA
Distribution: RHEL AS 4
Posts: 22

Original Poster
Rep: Reputation: 15
Any thoughts?
 
Old 03-28-2007, 07:32 PM   #4
debaire
LQ Newbie
 
Registered: May 2003
Location: Los Angeles, CA
Distribution: RHEL AS 4
Posts: 22

Original Poster
Rep: Reputation: 15
I'm tearing my hair out...would it be secure to post my entire conf file? Probably not...
 
Old 04-02-2007, 11:55 PM   #5
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,438

Rep: Reputation: 52
Did you make sure mod_cgi.so is loaded? That is needed if you wanted to run cgi scripts. In either case, it might be better to compile apache from source as you control and know what it has.

-twantrd
 
Old 04-03-2007, 12:47 PM   #6
debaire
LQ Newbie
 
Registered: May 2003
Location: Los Angeles, CA
Distribution: RHEL AS 4
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by twantrd
Did you make sure mod_cgi.so is loaded? That is needed if you wanted to run cgi scripts. In either case, it might be better to compile apache from source as you control and know what it has.

-twantrd
I feel like it's just a configuration problem...anything from what I posted give any hints? I'll try loading mod_cgi.so.
 
Old 04-03-2007, 12:54 PM   #7
debaire
LQ Newbie
 
Registered: May 2003
Location: Los Angeles, CA
Distribution: RHEL AS 4
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by debaire
I feel like it's just a configuration problem...anything from what I posted give any hints? I'll try loading mod_cgi.so.
It worked!! Thanks!
 
  


Reply

Tags
apache, as4, cgi, cgibin, modperl, perl, redhat


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
How can I run a perl and cgi scripts in my apache.?. ethnicme Programming 6 07-21-2006 04:02 AM
Apache CGI/Perl Internal Server Error CauticaL Linux - Software 7 07-10-2006 03:22 PM
I think I need a perl, apache, cgi GOD WorldBuilder Linux - Software 1 09-21-2003 09:49 AM
Enabling CGI and Perl on Apache 2.0.47 666Snake666 Linux - Newbie 1 09-17-2003 01:20 PM
Disallowing apache to use cgi and perl cannus Linux - General 8 12-21-2002 05:51 PM


All times are GMT -5. The time now is 11:29 PM.

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