Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: apache mod_perl

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005

    apache mod_perl

    Hello Geeks, ....

    Can anyone tell me as to how do i go abt running perl scripts on apache installed in a debian distro

    I have installed mod_perl for apache and also installed php4 with php4 worked well

    perl seems to giving me problems like an internal error....

    I HAVE configured ScriptAlias in the apache2.conf file as:.....

    ScriptAlias /cgi-trials/ /usr/share/apache2/default-site/cgi-bin/
    <Directory "/usr/share/apache2/default-site/cgi-bin">
    Options +ExecCGI
    AddHandler cgi-script .cgi .pl

    ALSO the error.log tells me this:.....

    [Sat Aug 27 17:45:07 2005] [notice] Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-15 mod_perl/1.999.21 Perl/v5.8.4 configured -- resuming normal operations
    [Sat Aug 27 17:46:05 2005] [error] [client] (Exec format error: exec of '/usr/share/apache2/default-site/cgi-bin/' failed
    [Sat Aug 27 17:46:05 2005] [error] [client] Premature end of script headers:[Sat Aug 27 17:46:05 2005] [error] [client] File does not exist: /var/www/favicon.ico

    Don't know exactly what this means....

    Another thing is that when i type http://localhost/cgi-trials/ on my browser it gives me 503 permission denied kinda errors. ... now how do i set permissions to make it more customised....!!

    If someone could please help me with this it will be of great help to me
    Thanks a lot in advance....

    Savio Monteiro
    Don Bosco Institute of Technology, Mumbai

  2. #2
    Just Joined!
    Join Date
    Dec 2004
    Lausanne - Switzerland

    Check if your script can be executed by Apache

    Here is a sample script to put in your cgi-bin directory.

    #!/usr/bin/perl -w

    print "Content-type: text/html\n\n";
    print "Hello, world";

    The post is outdated but it could maybe help somebody else.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts