ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nginx и ntop



Здравствуйте, All.

Решил перед веб-интерфейсом ntop поставить nginx

nginx version: nginx/0.8.54

location /ntop    {
            proxy_pass    http://127.0.0.1:3000;
            proxy_set_header Host $http_host;
            proxy_intercept_errors on;
            chunked_transfer_encoding off;
        }

ntop, как известно, разговаривает на HTTP 1.0

В итоге получаю:

# wget --spider -S 127.0.0.1:3000
Spider mode enabled. Check if remote file exists.
--2011-04-08 13:52:50--  http://127.0.0.1:3000/
Connecting to 127.0.0.1:3000... connected.
HTTP request sent, awaiting response...
  HTTP/1.0 501 Not Implemented
  Date: Fri, 08 Apr 2011 09:52:49 GMT
  Cache-Control: no-cache
  Expires: 0
  Connection: close
  Server: ntop/4.0.1/32-bit (i386-8.2-RELEASE-freebsd8.2)
  Content-Type: text/html
--2011-04-08 13:52:51--  (try: 2)  http://127.0.0.1:3000/
Connecting to 127.0.0.1:3000... connected.
HTTP request sent, awaiting response...
  HTTP/1.0 200 OK
  Date: Fri, 08 Apr 2011 09:52:51 GMT
  Cache-Control: no-cache
  Expires: 0
  Connection: close
  Server: ntop/4.0.1/32-bit (i386-8.2-RELEASE-freebsd8.2)
  Content-Type: text/html
Length: unspecified [text/html]
Saving to: `index.html'
2011-04-08 13:52:56 (9.25 KB/s) - `index.html' saved [43200]

Тут wget, получив HTTP/1.0 501 Not Implemented, делает новый запрос
уже по 1.0 и все ОК.

Далее:

# wget --spider -S firma.ru/ntop
Spider mode enabled. Check if remote file exists.
--2011-04-08 13:52:33--  http://firma.ru/ntop
Resolving firma.ru (firma.ru)... 81.19.75.176
Connecting to firma.ru (firma.ru)|81.19.75.176|:80... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 501 Not Implemented
  Server: nginx/0.8.54
  Date: Fri, 08 Apr 2011 09:52:34 GMT
  Content-Type: text/html
  Connection: keep-alive
  Cache-Control: no-cache
  Expires: 0
--2011-04-08 13:52:35--  (try: 2)  http://firma.ru/ntop
Connecting to firma.ru (firma.ru)|81.19.75.176|:80... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 502 Bad Gateway
  Server: nginx/0.8.54
  Date: Fri, 08 Apr 2011 09:52:35 GMT
  Content-Type: text/html
  Content-Length: 173
  Connection: keep-alive
Remote file does not exist -- broken link!!!

Т.е. nginx возвращает 501 от бэкенда в HTTP 1.1, еще один запрос и в
логах

upstream prematurely closed connection while reading response header from 
upstream

Как подружить nginx и бэкенд, работающий только по HTTP 1.0?

Спасибо.

-- 
С уважением,
 Dmitry                          


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.