From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <3EA2D5CB.5010102@rmts.donpac.ru> Date: Sun, 20 Apr 2003 21:15:55 +0400 From: =?KOI8-R?Q?=F0=D2=CF=CB=CF=D0=D8=C5=D7_=E5=D7=C7=C5=CE=C9=CA?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030210 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: community@altlinux.ru Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit Subject: [Comm] httpd-perl error Sender: community-admin@altlinux.ru Errors-To: community-admin@altlinux.ru X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.0.9 Precedence: bulk Reply-To: community@altlinux.ru List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Archived-At: List-Archive: List-Post: Здравствуйте! В /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 400 Bad Request

Bad Request

Your browser sent a request that this server could not understand.

Invalid URI in request get index.pl

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"; Где я ошибся? -- С уважением, Прокопьев Евгений From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Dmitry Alexeyev To: community@altlinux.ru Subject: Re: [Comm] httpd-perl error Date: Sun, 20 Apr 2003 18:35:44 +0400 User-Agent: KMail/1.5 References: <3EA2D5CB.5010102@rmts.donpac.ru> In-Reply-To: <3EA2D5CB.5010102@rmts.donpac.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200304201835.44708.dmi@mv.stu.neva.ru> Sender: community-admin@altlinux.ru Errors-To: community-admin@altlinux.ru X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.0.9 Precedence: bulk Reply-To: community@altlinux.ru List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Archived-At: List-Archive: List-Post: День добрый. В сообщении от Воскресенье 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Pavel Tsybulin Organization: Alkorn To: community@altlinux.ru Subject: Re: [Comm] httpd-perl error Date: Sun, 20 Apr 2003 18:41:21 +0400 User-Agent: KMail/1.5 References: <3EA2D5CB.5010102@rmts.donpac.ru> In-Reply-To: <3EA2D5CB.5010102@rmts.donpac.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200304201841.21714.pavelt@alkorn.ru> Sender: community-admin@altlinux.ru Errors-To: community-admin@altlinux.ru X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.0.9 Precedence: bulk Reply-To: community@altlinux.ru List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Archived-At: List-Archive: List-Post: тут ошибок несколько. > $ 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" From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: "Denis S. Filimonov" To: community@altlinux.ru Subject: Re: [Comm] httpd-perl error Date: Sun, 20 Apr 2003 21:41:09 +0700 User-Agent: KMail/1.5 References: <3EA2D5CB.5010102@rmts.donpac.ru> In-Reply-To: <3EA2D5CB.5010102@rmts.donpac.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200304202141.09919.den@academ.org> Sender: community-admin@altlinux.ru Errors-To: community-admin@altlinux.ru X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.0.9 Precedence: bulk Reply-To: community@altlinux.ru List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Archived-At: List-Archive: List-Post: 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 > > > 400 Bad Request > >

Bad Request

> Your browser sent a request that this server could not understand.

> Invalid URI in request get index.pl

> > 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 отдавать?