ALT Linux Community general discussions
 help / color / mirror / Atom feed
* Re: [Comm] httpd-perl error
  2003-04-20 17:15 [Comm] httpd-perl error Прокопьев Евгений
@ 2003-04-20 14:35 ` Dmitry Alexeyev
  2003-04-20 14:41 ` Denis S. Filimonov
  2003-04-20 14:41 ` Pavel Tsybulin
  2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Alexeyev @ 2003-04-20 14:35 UTC (permalink / raw)
  To: community

День добрый. 

В сообщении от Воскресенье 20 Апрель 2003 21:15 Прокопьев Евгений написал(a):
> Connected to localhost.
> Escape character is '^]'.
> get index.pl

Попробуйте 
GET /index.pl HTTP/1.0

(два нажатия на Enter)

> -bash-2.05b$ cat /var/www/perl/index.pl
> #!/usr/bin/perl
> print "hello\n";

Такой скрипт работать не будет, т.к. не указан тип передаваемых данных. 
Укажите Content-type: text/html 

dmi


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

* Re: [Comm] httpd-perl error
  2003-04-20 17:15 [Comm] httpd-perl error Прокопьев Евгений
  2003-04-20 14:35 ` Dmitry Alexeyev
@ 2003-04-20 14:41 ` Denis S. Filimonov
  2003-04-20 14:41 ` Pavel Tsybulin
  2 siblings, 0 replies; 4+ messages in thread
From: Denis S. Filimonov @ 2003-04-20 14:41 UTC (permalink / raw)
  To: community

21 Апрель 2003 00:15, Прокопьев Евгений написал:
> Здравствуйте!
>
> В /etc/httpd/conf/httpd-perl.conf присутствуют следующие строчки:
>
> DocumentRoot /var/www/perl
> Port 8200
>
> Исполняется сервис с правами apache.apache
>
> Но при попытке подключиться я получаю следующее:
>
> $ telnet localhost 8200
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> get index.pl
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <HTML><HEAD>
> <TITLE>400 Bad Request</TITLE>
> </HEAD><BODY>
> <H1>Bad Request</H1>
> Your browser sent a request that this server could not understand.<P>
> Invalid URI in request get index.pl<P>
> </BODY></HTML>
> Connection closed by foreign host.
>
> С правами все нормально:
>
> # ls -l /var/www
> total 7
> drwxrws--x    2 root     webmaster       96 Апр 17 01:41 cgi-bin
> drwxrwsr-x    3 root     webmaster     1184 Апр 17 01:42 html
> drwxrws--x    3 root     webmaster     4528 Апр 17 01:41 icons
> drwxrws--t    2 apache   apache         72 Апр 20 14:29 perl
> [root@ugtovar conf]# ls -l /var/www/perl/
> total 4
> -rwxrwxr-x    1 apache   apache         35 Апр 20 14:30 index.pl
> [root@ugtovar conf]# su - apache -s /bin/bash
> -bash-2.05b$ /var/www/perl/index.pl
> hello
> -bash-2.05b$ cat /var/www/perl/index.pl
> #!/usr/bin/perl
> print "hello\n";
>
> Где я ошибся?
там же написано: Invalid URI in request get index.pl
по хорошему надо писать: get /index.pl HTTP/1.0
в данном случае проблема, скорее всего в отсутствии слеша в начале URI
да и сам скрипт... а кто будет Content-type отдавать?



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

* Re: [Comm] httpd-perl error
  2003-04-20 17:15 [Comm] httpd-perl error Прокопьев Евгений
  2003-04-20 14:35 ` Dmitry Alexeyev
  2003-04-20 14:41 ` Denis S. Filimonov
@ 2003-04-20 14:41 ` Pavel Tsybulin
  2 siblings, 0 replies; 4+ messages in thread
From: Pavel Tsybulin @ 2003-04-20 14:41 UTC (permalink / raw)
  To: community

тут ошибок несколько.

> $ telnet localhost 8200
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> get index.pl

1. неправильный запрос get
get /index.pl http/1.0


> -bash-2.05b$ cat /var/www/perl/index.pl
> #!/usr/bin/perl
> print "hello\n";

первой строкой ответа CGI должно быть
print "Content-type; text/html\n\n"



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

* [Comm] httpd-perl error
@ 2003-04-20 17:15 Прокопьев Евгений
  2003-04-20 14:35 ` Dmitry Alexeyev
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Прокопьев Евгений @ 2003-04-20 17:15 UTC (permalink / raw)
  To: community

Здравствуйте!

В /etc/httpd/conf/httpd-perl.conf присутствуют следующие строчки:

DocumentRoot /var/www/perl
Port 8200

Исполняется сервис с правами apache.apache

Но при попытке подключиться я получаю следующее:

$ telnet localhost 8200
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
get index.pl
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Invalid URI in request get index.pl<P>
</BODY></HTML>
Connection closed by foreign host.

С правами все нормально:

# ls -l /var/www
total 7
drwxrws--x    2 root     webmaster       96 Апр 17 01:41 cgi-bin
drwxrwsr-x    3 root     webmaster     1184 Апр 17 01:42 html
drwxrws--x    3 root     webmaster     4528 Апр 17 01:41 icons
drwxrws--t    2 apache   apache         72 Апр 20 14:29 perl
[root@ugtovar conf]# ls -l /var/www/perl/
total 4
-rwxrwxr-x    1 apache   apache         35 Апр 20 14:30 index.pl
[root@ugtovar conf]# su - apache -s /bin/bash
-bash-2.05b$ /var/www/perl/index.pl
hello
-bash-2.05b$ cat /var/www/perl/index.pl
#!/usr/bin/perl
print "hello\n";

Где я ошибся?
-- 
С уважением, Прокопьев Евгений



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

end of thread, other threads:[~2003-04-20 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-20 17:15 [Comm] httpd-perl error Прокопьев Евгений
2003-04-20 14:35 ` Dmitry Alexeyev
2003-04-20 14:41 ` Denis S. Filimonov
2003-04-20 14:41 ` Pavel Tsybulin

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