The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]




Версия для распечатки Пред. тема | След. тема
Новые ответы [ Отслеживать ]
mod_perl, !*! CombatPenguin, 13-Сен-07, 18:06  [смотреть все]
Server Version: Apache/2.2.3 (Debian) mod_perl/2.0.2 Perl/v5.8.8

Кусок конфига отвечающего за mod_perl:
<IfModule mod_perl.c>
    Alias /test/ /var/www/test/

    #PerlModule Apache::DBI
    <Directory /var/www/test/>
        DirectoryIndex index.pl
        Options -Indexes
        Allow from all
    </Directory>

    <Files ~ "\.(cgi|pl)$">
        SetHandler perl-script
        PerlHandler ModPerl::Registry
        Options +ExecCGI
        PerlSendHeader on
    </Files>

    <Location /perl-status>
        SetHandler perl-script
        PerlHandler Apache2::Status
        Order deny,allow
        Deny from all
        Allow from 192.168.0.1
    </Location>
</IfModule>

В руководстве написано, что директива PerlSendHeader on используется
для формирования корректного http заголовка.

Однако, если я убираю из скрипта print "Content-type: text/plain\r\n\r\n";
то браузер предлагает мне сохранить сам скрипт указывая что он формата text/x-perl

Куда копать?

  • mod_perl, !*! A, 18:22 , 13-Сен-07 (1)
    • mod_perl, !*! CombatPenguin, 19:17 , 13-Сен-07 (2)
      >Не знаю, поможет ли, но
      >Options +ExecCGI
      >здесь, мне кажется, ни к чему.
      >Попробуйте её убрать.

      Иначе скрипт не будет выполняться.

      Options +ExecCGI ordinarily tells Apache that it’s OK for the directory to contain
      CGI scripts. In this case, the flag is required by Apache::Registry to confirm
      that you really know what you’re doing. Additionally, all scripts located in directories
      handled by Apache::Registry must be executable, another check against
      wayward non-script files getting left in the directory accidentally. If you omit this
      option, the script either will be rendered as plain text or will trigger a Save As
      dialog, depending on the client.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру