cgi script showing text

I am running apache 2.4 latest on FreeBSD 11.

When I display the web page it shows the actual text from the file instead of running the cgi script. I can't think of what I am missing to run this.

Here is my Apache config:

Code:
<VirtualHost *:80>
LoadModule fcgid_module libexec/apache24/mod_fcgid.so
LoadModule perl_module libexec/apache24/mod_perl.so
ServerName      rancid3git.borg.local
RedirectMatch ^/$ /gitweb.cgi
SetEnv GITWEB_PROJECTROOT /usr/local/var/rancid/NetworkDevices
Alias /gitweb.js                /usr/local/www/gitweb/gitweb.js
Alias /gitweb.css               /usr/local/www/gitweb/gitweb.css
Alias /git-logo.png             /usr/local/www/gitweb/git-logo.png
Alias /git-favicon.png  /usr/local/www/gitweb/git-favicon.png
AddHandler cgi-script .cgi
ScriptAlias / "/usr/local/www/gitweb/"
  <Directory "/usr/local/www/gitweb/">
        DirectoryIndex gitweb.cgi
        AllowOverride none
        Options Indexes FollowSymLinks ExecCGI MultiViews
        Require all granted
  </Directory>
LogLevel DEBUG
ErrorLog "/var/log/httpd-git-pub.borg.local-access.log"
CustomLog "/var/log/httpd-git-pub.borg.local-error.log" common
</VirtualHost>

Code:
root@rancid3git:/usr/local/www # ls -la
total 20
drwxr-xr-x   5 root  wheel  512 Jan 30 12:47 .
drwxr-xr-x  15 root  wheel  512 Jan 11 10:05 ..
drwxr-xr-x   6 root  wheel  512 Jan 11 09:59 apache24
drwxr-xr-x   2 root  wheel  512 Jan 30 12:47 cgi-bin
drwxr-xr-x   2 root  wheel  512 Jan 30 10:15 gitweb
root@rancid3git:/usr/local/www #
root@rancid3git:/usr/local/www/gitweb # ls -la
total 256
drwxr-xr-x  2 root  wheel     512 Jan 30 10:15 .
drwxr-xr-x  5 root  wheel     512 Jan 30 12:47 ..
-rwxr-xr-x  1 root  www    252143 Jan 30 10:52 gitweb.cgi
root@rancid3git:/usr/local/www/gitweb #
 
andrewm659 Don't be that guy:

wisdom_of_the_ancients.png
 
Still compiling step-by-step trying to figure out if I should use gitweb or something that's a little prettier...
 
Back
Top