title: Perl files in Virtualhosts cgi-bin are always downloaded (Debian 6 and Apache2)
body: <p>I have been tearing my hair out trying to get this working but no matter what I do I can't get .pl files to execute in the cgi-bin of my virtual directory. I have been searching for solutions for the past 4 hours and have tried everything I have come across, and nothing works for me. Perl files are executing perfectly for my default site, just not for my virtual host. The only mopdified file in my Apache2 configuration is the /etc/apache2/sites-available/default file, and currently it is as follows (except for the sitename):</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerAdmin webmaster@localhost
  
      DocumentRoot /var/www
      &lt;Directory /&gt;
              Options FollowSymLinks
              AllowOverride All
      &lt;/Directory&gt;
      &lt;Directory /var/www/&gt;
              Options Indexes FollowSymLinks MultiViews
              AllowOverride All
              Order allow,deny
              allow from all
     &lt;/Directory&gt;
  
      &lt;Directory /var/www/cgi-bin&gt;
              Options +ExecCGI
              AllowOverride All
              AddHandler cgi-script cgi pl
              Order allow,deny
              allow from all
      &lt;/Directory&gt;
  
  
  #       ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  #       &lt;Directory "/usr/lib/cgi-bin"&gt;
  #               AllowOverride All
  #               Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  #               Order allow,deny
  #               Allow from all
  #       &lt;/Directory&gt;
  
      ErrorLog ${APACHE_LOG_DIR}/error.log
  
      # Possible values include: debug, info, notice, warn, error, crit,
      # alert, emerg.
      LogLevel warn
  
      CustomLog ${APACHE_LOG_DIR}/access.log combined
  
  Alias /doc/ "/usr/share/doc/"
  &lt;Directory "/usr/share/doc/"&gt;
      Options Indexes MultiViews FollowSymLinks
      AllowOverride None
      Order deny,allow
      Deny from all
      Allow from 127.0.0.0/255.0.0.0 ::1/128
  &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  
  
  &lt;VirtualHost *:80&gt;
  ServerAlias subdom.mysite.com
  DocumentRoot /var/www/subdom
      &lt;Directory /var/www/subdom/cgi-bin&gt;
              Options +ExecCGI
              AllowOverride All
              AddHandler cgi-script cgi pl
              Order allow,deny
              allow from all
      &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Any and all help is very much appreciated.</p>