Не выполняются cgi сценарии (Trustix linux)

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

Initd
Сообщения: 16
ОС: Debian, Gentoo, Mac OS X

Не выполняются cgi сценарии

Сообщение Initd »

Apache+php работает стабильно
при попытке запустить cgi скрипт получаю такое:

Код: Выделить всё

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@cs.vsu.ru 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.


В логах вижу:

Код: Выделить всё

Premature end of script headers:

Права на скрипты проверял - 755(пробовал и 777)
В конфиге cgi включен :

Код: Выделить всё

LoadModule cgi_module mod_cgi.so

Плюс написал для нужной директории

Код: Выделить всё

<Directory /localhome/httpd/chat>
  Options +ExecCGI
  AddHandler cgi-script .cgi
</Directory>

Ума не приложу в чем проблема. Нигде, ни в одной из директорий не запускаются cgi скрипты.
Есть также в конфиге строка

Код: Выделить всё

ScriptAlias /cgi-bin/ путь к папке

в ней также ничего не запускается с такими же синдромами

Прошу помощи!
Спасибо сказали:
MakkyWelly
Сообщения: 97
ОС: по обстоятельствам :)

Re: Не выполняются cgi сценарии

Сообщение MakkyWelly »

попробуйте для cgi-папок:

Код: Выделить всё

<Directory "/site/www.site.ru/WWW/cgi-bin">
    AllowOverride None
    Options +ExecCGI
    SetHandler cgi-script
    <IfModule mod_access.c>
      Order allow,deny
      Allow from all
    </IfModule>
</Directory>

# потом

ScriptAlias /cgi-bin/ /site/www.site.ru/WWW/cgi-bin/

# для части
<IfModule mod_mime.c>

    # ...

    AddHandler cgi-script .cgi
    Action cgi-script /usr/bin/perl
</IfModule>

соответственно для обычных директорий как-то:

Код: Выделить всё

DocumentRoot "/site/www.site.ru/WWW"

<Directory "/site/www.site.ru/WWW">
    Options -Indexes FollowSymLinks MultiViews Includes
    AllowOverride All
    <IfModule mod_access.c>
      Order allow,deny
      Allow from all
    </IfModule>
</Directory>

# и т.п.

и закрыть:

Код: Выделить всё

<Directory />
  Options -All -Multiviews
  AllowOverride None
  <IfModule mod_access.c>
    Order deny,allow
    Deny from all
  </IfModule>
</Directory>

# можно ещё что-нибудь закрыть
die sheep! die to reverse the system
you accept (reject, respect);
next step,
kill next sacrifice, each sacrifice
Спасибо сказали: