I need to enable web interface for Asterisk Voice mail. To do that I put Perl scripts from asterisk dir to /var/www/vmail. And started Apache2.
But when I go to localhost/vmail/vmail.cgi it doesn't execute it but offers me to download this script. I made this script executable, added mod_perl to the list of modules to load but result is the same.
What can be wrong? Thank you in advance.

Here is my mod_perl.conf

<Directory "/srv/www/perl-lib">
    AllowOverride None
    Options None
    Order allow,deny
    Deny from all
<IfModule mod_perl.c>

    AddHandler cgi-script .bat .exe .pl .cgi

    PerlRequire "/etc/apache2/mod_perl-startup.pl"
    ScriptAlias /perl/ "/srv/www/cgi-bin/"
    <Location /perl/>
        # mod_perl mode
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        PerlOptions +ParseHeaders
        Options +ExecCGI
    ScriptAlias /cgi-perl/ "/srv/www/cgi-bin/"
    <Location /cgi-perl>
        # perl cgi mode
        SetHandler  perl-script
        PerlResponseHandler ModPerl::PerlRun
        PerlOptions +ParseHeaders
        Options +ExecCGI
    # The /cgi-bin/ ScriptAlias is already set up in httpd.conf
# vim: ft=apache
  • @Ivan AddHandler ? – ajreal Dec 9 '10 at 15:36
  • Added my mod_perl.conf as an answer. I added AddHandler to it but it didn't help – Ivan Dec 9 '10 at 16:00

You've configured the handlers for location /cgi-perl and /perl/ , so shouldn't you put the vmail.cgi script on the filesystem on path /srv/www/cgi-bin/vmail.cgi and ask for http://localhost/perl/vmail.cgi or http://localhost/cgi-perl/vmail.cgi ?

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.