Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/"
    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
share|improve this question

migrated from Dec 10 '10 at 21:36

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

@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 ?

share|improve this answer

Your Answer


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.