ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [mdk-re] CGI trouble
@ 2001-10-28 16:26 Balamut
  2001-10-28 16:43 ` Dmitriy Gnidchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Balamut @ 2001-10-28 16:26 UTC (permalink / raw)
  To: mandrake-russian

Hello mandrake-russian,

Не понимаю, как настроить у себя работу apache с cgi. При вводе адреса
http://localhost/cgi-bin/server.cgi получаю ошибку 500

Internal Server Error
Apache/1.3.22 Server at localhost.localdomain Port 80

В error-log такие сообщения
[Sun Oct 28 15:48:28 2001] [notice] Apache/1.3.22 (ALT Linux/alt1) PHP/4.0.6 rus/PL30.9 configured -- resuming normal operations
....
[Sun Oct 28 15:51:04 2001] [error] (2)No such file or directory: exec of /var/www/cgi-bin/server.cgi failed
[Sun Oct 28 15:51:04 2001] [error] [client 127.0.0.1] Premature end of script headers: /var/www/cgi-bin/server.cgi

В /etc/httpd/conf/httpd.conf в секцию <Directory "/var/www/html">

добавил "ExecCGI":

    Options Indexes Includes FollowSymLinks __ExecCGI__ MultiViews

Себя добавил в группу webmaster.
Установил apache-mod_perl, perl, perl_CGI
Что еще?

http://localhost как и положено, выводит главную страницу апача.

-- 
Best regards,
 Balamut                          mailto:balamut@au.ru





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [mdk-re] CGI trouble
  2001-10-28 16:26 [mdk-re] CGI trouble Balamut
@ 2001-10-28 16:43 ` Dmitriy Gnidchenko
  2001-10-28 16:53 ` John Profic
  2001-10-28 16:59 ` Sergey Vlasov
  2 siblings, 0 replies; 4+ messages in thread
From: Dmitriy Gnidchenko @ 2001-10-28 16:43 UTC (permalink / raw)
  To: mandrake-russian

> Не понимаю, как настроить у себя работу apache с cgi. При вводе адреса
> http://localhost/cgi-bin/server.cgi получаю ошибку 500
>
> Internal Server Error
> Apache/1.3.22 Server at localhost.localdomain Port 80
>
> В error-log такие сообщения
> [Sun Oct 28 15:48:28 2001] [notice] Apache/1.3.22 (ALT Linux/alt1) PHP/4.0.6 rus/PL30.9 configured -- resuming normal operations
> ....
> [Sun Oct 28 15:51:04 2001] [error] (2)No such file or directory: exec of /var/www/cgi-bin/server.cgi failed
> [Sun Oct 28 15:51:04 2001] [error] [client 127.0.0.1] Premature end of script headers: /var/www/cgi-bin/server.cgi
Возможно у тебя не правильный синтаксис в CGI скрипте.
И еще глянь, он должен быть исполняемым.


С Уважением
	Дмитрий  savithur@avatar.spb.ru




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [mdk-re] CGI trouble
  2001-10-28 16:26 [mdk-re] CGI trouble Balamut
  2001-10-28 16:43 ` Dmitriy Gnidchenko
@ 2001-10-28 16:53 ` John Profic
  2001-10-28 16:59 ` Sergey Vlasov
  2 siblings, 0 replies; 4+ messages in thread
From: John Profic @ 2001-10-28 16:53 UTC (permalink / raw)
  To: mandrake-russian

Balamut wrote:

> Hello mandrake-russian,
> Не понимаю, как настроить у себя работу apache с cgi. При вводе адреса
> http://localhost/cgi-bin/server.cgi получаю ошибку 500
> Internal Server Error
> Apache/1.3.22 Server at localhost.localdomain Port 80
> В error-log такие сообщения
> [Sun Oct 28 15:48:28 2001] [notice] Apache/1.3.22 (ALT Linux/alt1) PHP/4.0.6 rus/PL30.9 configured -- resuming normal operations
> ....
> [Sun Oct 28 15:51:04 2001] [error] (2)No such file or directory: exec of /var/www/cgi-bin/server.cgi failed

Тут видимо ругается на интерпритатор этого cgi-шника, т.е. в первой 
строке должен быть написан правильный путь к интерпритатору :)
Проверьте его вначале из консоли :)

> [Sun Oct 28 15:51:04 2001] [error] [client 127.0.0.1] Premature end of script headers: /var/www/cgi-bin/server.cgi

Ну а поскольку он не правильно выполняется, то и заголовки нужные не 
отдает, а апач без этого кричит error 500 :)
-- 
Best regards,
  John Profic <profic@lrn.ru>
Written by Mozilla 0.9.5
using SelfMake! Linux v0.9 based on ASPLinux release 1.1
with locale ru_RU.CP1251,
system: kernel 2.4.10-xfs-p1; glibc 2.2.4; gcc 3.0.1; XFree86 4.1.0;





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [mdk-re] CGI trouble
  2001-10-28 16:26 [mdk-re] CGI trouble Balamut
  2001-10-28 16:43 ` Dmitriy Gnidchenko
  2001-10-28 16:53 ` John Profic
@ 2001-10-28 16:59 ` Sergey Vlasov
  2 siblings, 0 replies; 4+ messages in thread
From: Sergey Vlasov @ 2001-10-28 16:59 UTC (permalink / raw)
  To: mandrake-russian

On Sun, 28 Oct 2001 16:29:41 +0300
Balamut <balamut@au.ru> wrote:

> Не понимаю, как настроить у себя работу apache с cgi. При вводе адреса
> http://localhost/cgi-bin/server.cgi получаю ошибку 500
> 
> Internal Server Error
> Apache/1.3.22 Server at localhost.localdomain Port 80
> 
> В error-log такие сообщения
> [Sun Oct 28 15:48:28 2001] [notice] Apache/1.3.22 (ALT Linux/alt1) PHP/4.0.6 rus/PL30.9 configured -- resuming normal operations
> ....
> [Sun Oct 28 15:51:04 2001] [error] (2)No such file or directory: exec of /var/www/cgi-bin/server.cgi failed

Файл этот на месте? Доступ к файлу на исполнение есть? (Учтите,
что процесс сервера выполняется с правами пользователя apache.)
Стоит проверить, что этот файл сам по себе запускается. (В
Perl-CGI при прямом запуске включается отладочный режим - man
CGI.)

> [Sun Oct 28 15:51:04 2001] [error] [client 127.0.0.1] Premature end of script headers: /var/www/cgi-bin/server.cgi
> 
> В /etc/httpd/conf/httpd.conf в секцию <Directory "/var/www/html">
> 
> добавил "ExecCGI":
> 
>     Options Indexes Includes FollowSymLinks __ExecCGI__ MultiViews

А вот этого не надо - как раз для того и используют каталог
cgi-bin, чтобы скрипты не выполнялись откуда попало.

> Себя добавил в группу webmaster.
> Установил apache-mod_perl, perl, perl_CGI
> Что еще?

Учиться, учиться и учиться :-)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-10-28 16:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-28 16:26 [mdk-re] CGI trouble Balamut
2001-10-28 16:43 ` Dmitriy Gnidchenko
2001-10-28 16:53 ` John Profic
2001-10-28 16:59 ` Sergey Vlasov

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git