[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Having trouble allowing cgi script on jessie



Running jessie with  apache2-2.4.10-1


Haven't run a web server on my home lan for a while so trying to get
that working.

Starting with the default installed setup:

I can hit the default home page and my *html stuff just fine.

However it seems *.cgi scripts are not allowed to fire.

OK, I googled a while and ended up adding ExecCGI and a handler to
/etc/apache2/apache2.conf so it looks like this:

<Directory /var/www/>
   Options Indexes FollowSymLinks ExecCGI
   AllowOverride None
   Require all granted
   AddHandler cgi-script .cgi .pl
</Directory>

But cgi scripts just open as files with perl code.  It doesn't
fire.

I wasn't sure if /var/www/ in directive above was confined to that
directory only or if it is recursive... but seem to recall that those
are recursive (is that right)

But just in case I added:

<Directory /var/www/html>
   Options Indexes FollowSymLinks ExecCGI
   AllowOverride None
   Require all granted
   AddHandler cgi-script .cgi .pl
</Directory>

Still ... no cigar... cgi scripts are just displayed as text file,

The scripts I'm testing fire as expected when called from the cmdline.

I put a cgi in /usr/lib/cgi-bin/  On the chance that was where apache2
expects to find them but still the same... not firing.

Note too, that I see this in /etc/apache2/conf-enabled/serve-cgi-bin.conf: 

   <IfDefine ENABLE_USR_LIB_CGI_BIN>
      ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
      <Directory "/usr/lib/cgi-bin">
         AllowOverride None
         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
         Require all granted
      </Directory>
   </IfDefine>

Not sure what baring that has on this.

Can anyone coach me toward running a really small web service on my
home lan that allows cgi in any directory?


Reply to: