1

I am trying to make a site with index.cgi, if available, served up as the content. In /etc/apache2/sites-enabled/000-default, I have:

    DirectoryIndex index.cgi index.html
    DocumentRoot /home/jonathan/mirror

The DocumentRoot is given +ExecCGI:

            Options +ExecCGI Indexes FollowSymLinks MultiViews

When I visit localhost, it displays the source of index.cgi:

#!/usr/bin/perl
if ($ENV{"HTTP_HOST"} =~ /^www\./)
    {
    print "Status: 301 Moved Permanently\n";
    print "Location: http://" . substr($ENV{"HTTP_HOST"}, 4) . "\n\n";
    }
if ($ENV{"HTTP_HOST"} =~ /^fan/ or $ENV{"HTTP_HOST"} =~ /jonathanscommunity/)
    {
    print "Status: 301 Moved Permanently\n";
    print "Location: http://www.facebook.com/pages/CJS-Hayward/9506801167\n\n";
...

What do I need to do so the /index.cgi is executed and its results given?

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
Christos Hayward
  • 1,162
  • 3
  • 16
  • 35

0 Answers0