Welcome! Log In Create A New Profile

Advanced

Re: areca-http

April 11, 2011 08:14AM
On 04/11/11 06:09, Alexander Petrovsky wrote:
>
>
> 11 апреля 2011 г. 9:01 пользователь Sergey Kobzar
> <sergey.kobzar@itcraft.org <mailto:sergey.kobzar@itcraft.org>> написал:
>
> Есть веб сервис по управлению RAID контроллером areca-http:
>
> # netstat -nlp | grep areca
> tcp 0 0 127.0.0.1:1080 http://127.0.0.1:1080
> 0.0.0.0:* LISTEN 12924/areca-http
> tcp 0 0 127.0.0.1:1081 http://127.0.0.1:1081
> 0.0.0.0:* LISTEN 12924/areca-http
> tcp 0 0 127.0.0.1:1082 http://127.0.0.1:1082
> 0.0.0.0:* LISTEN 12924/areca-http
> udp 0 0 127.0.0.1:7890 http://127.0.0.1:7890
> 0.0.0.0:* 12924/areca-http
> udp 0 0 127.0.0.1:7891 http://127.0.0.1:7891
> 0.0.0.0:* 12924/areca-http
>
>
> Необходимо с помощью Nginx проксировать этот сервис.
>
> Конфиг:
>
> server {
> listen 443 default ssl;
> server_name localhost;
>
> ssl on;
> ssl_certificate /etc/ssl/private/cert.crt;
> ssl_certificate_key /etc/ssl/private/cert.key;
>
> access_log /var/log/nginx/default-ssl_access.log main;
> error_log /var/log/nginx/default-ssl_error.log info;
>
> root /home/www/default-ssl/htdocs;
>
> location ^~ /areca_main {
> proxy_pass http://localhost:1080/;
>
> set $fixed_destination $http_destination;
> if ( $http_destination ~* ^https(.*)$ ) {
> set $fixed_destination http$1;
> }
>
> proxy_set_header Destination $fixed_destination;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For
> $proxy_add_x_forwarded_for;
> }
>
> include /etc/nginx/fastcgi_main.conf;
> }
>
>
> Но на сервис попасть не могу. В логах:
> 2011/04/11 00:40:16 [error] 12713#0: *12 upstream timed out (110:
> Connection timed out) while reading upstream, client: 94.179.46.103,
> server: localhost, request: "GET /areca_main HTTP/1.1", upstream:
> "http://127.0.0.1:1080/", host: "64.205.149.45"
> 2011/04/11 00:40:47 [info] 12713#0: *12 client 94.179.46.103 closed
> keepalive connection
>
> Что не так?
>
>
> Кажется это означает, что nginx не дождался ответа от проксируемого
> сервера. Попробуйте поиграться с директивами:
>
> proxy_read_timeout;
> proxy_send_timeout;

Да - так и есть. Если я вешаю сервис на внешний интерфейс, то могу к
нему подключиться без проблем и работает он шустро.

Дефолтных таймаутов в 60 сек - с головой.

Дело в том, что сам сервис areca-http в плане безопасности довольно
корявый, но свою работу делает исправно. Поэтому возникла идея спрятать
его за nginx (который и так крутится на сервере) и прикрыть http
аутентификацией.

Вот только что-то не выходит к нему подключиться через nginx...

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

areca-http

sergey.kobzar April 10, 2011 08:02PM

Re: areca-http

Alexander Petrovsky April 10, 2011 11:10PM

Re: areca-http

sergey.kobzar April 11, 2011 08:14AM

Re[2]: areca-http

Михаил Монашёв April 11, 2011 08:26AM

Re: areca-http

sergey.kobzar April 11, 2011 01:54PM

Re: areca-http

sergey.kobzar April 11, 2011 02:04PM

Re: areca-http

Maxim Dounin April 11, 2011 02:30PM

Re: areca-http

sergey.kobzar April 11, 2011 04:46PM

Re: areca-http

Maxim Dounin April 11, 2011 05:22PM

Re: areca-http

sergey.kobzar April 11, 2011 05:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 78
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready