tags:

views:

24

answers:

1

I'm trying to make the root directory for a virtual host so that it can execute CGI scripts. I put the following in my virtual host declaration:

<VirtualHost *:80>
    <Directory />
    Options +ExecCGI
    </Directory>

    DocumentRoot /path/to/root
    ServerName servername
    AddHandler cgi-script .pl
</VirtualHost>

But when I try execute the CGI script, it just downloads it instead.

+1  A: 

Either use:

<Directory /path/to/root>
    Options +ExecCGI
</Directory>

or

<Location />
    Options +ExecCGI
</Location>

See Directory and Location in Apache docs.

Sinan Ünür