0

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
</Directory>
<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
    </Location>
    ScriptAlias /cgi-perl/ "/srv/www/cgi-bin/"
    <Location /cgi-perl>
        # perl cgi mode
        SetHandler  perl-script
        PerlResponseHandler ModPerl::PerlRun
        PerlOptions +ParseHeaders
        Options +ExecCGI
    </Location>
    # The /cgi-bin/ ScriptAlias is already set up in httpd.conf
</IfModule>
# vim: ft=apache
Ivan
  • 101
  • 2

1 Answers1

0

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 ?

ivy
  • 136
  • 3