Давно ищу в интернете, Способов настроить CGI много , но ни один не работает . Часто ссылаются на файлы конфигураций, которых у меня в Apache вообще нет.
Раньше писал на PHP. Apache работал отлично.
устанавливал:
libapache2-mod-perl2
sites-available/site:
<VirtualHost *:80>
ServerAlias site1
ScriptAlias /cgi-bin/ /var/www/
<Directory /var/www>
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
На данный момент браузер по адресу
http://site1/cgi-bin/in.cgi выдаёт:
Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.22 (Ubuntu) Server at site1 Port 80
Тестовый фаил var/www/in.cgi
#!/usr/bin/perl -w
print “Content-type: text/html\n\n”;
print “Hello there!<br />\nJust testing .<br />\n”;
for ($i=0; $i<10; $i++)
{
print $i.”<br />”;
}
Что мне надо исправить?