Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
    
@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
add comment

migrated from stackoverflow.com Dec 10 '10 at 21:36

This question came from our site for professional and enthusiast programmers.

1 Answer

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 ?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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