[MASOCH-L] Help com Nginx
Derick Fontes
dbfontes at gmail.com
Wed Oct 11 19:36:30 BRT 2017
não vejo problemas na config que mandou.
nos envie o retorno do curl dando o bad gateway, rode "curl -i"
veja os logs do webservice, para simplificar, deixe somente um server no
upstream e tente buscar nos logs do webservice.
Em 11 de outubro de 2017 19:16, Rejaine Monteiro <rejaine at bhz.jamef.com.br>
escreveu:
>
> Fiz conforme sugeriu, mas aconteceu o mesmo problema:
>
> Estou rodando o Nginx no SLES12 - nginx/1.12.1 (rpm : sles12
> nginx-1.12.1-1.sles12.ngx.x86_64 )
>
> abaixo tem a nova configuração e os resultados dos comandos netstat e
> "curl". Nginx e webservices estão de fato na mesma máquina... O serviço
> http é um serviço proprietário da Totvs. Eu já consegui fazer o balance
> funcionar usando o mesmo Nginx para o REST deles, só para o WS/Soap que
> não tá rolando...
>
>
> nginx.conf:
> upstream ws {
> server 127.0.0.1:9091 max_fails=2 fail_timeout=5s;
> server 127.0.0.1:9092 max_fails=2 fail_timeout=5s;
> server 127.0.0.1:9093 max_fails=2 fail_timeout=5s;
> }
> server {
> server_name server.mydomain.com;
> listen 80;
> location / {
> proxy_pass http://ws;
> }
> }
>
>
> # netstat -an | grep 909
> tcp 0 0 127.0.0.1:9091 0.0.0.0:* LISTEN
> tcp 0 0 127.0.0.1:9092 0.0.0.0:* LISTEN
> tcp 0 0 127.0.0.1:9093 0.0.0.0:* LISTEN
>
> # curl http://127.0.0.1:9091
>
> % Total % Received % Xferd Average Speed Time Time Time
> Current
> Dload Upload Total Spent Left
> Speed
> 12 122k 12 16059 0 0 14777 0 0:00:08 0:00:-- --:--:--
> 0
> :01 0:00:0<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> 7 <html>
> 14<head>
> 787<title>TOTVS - Web Services</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <link href="images/xmlws.css" rel="stylesheet" type="text/css">
> </head>
>
> etc...
>
>
> __
> masoch-l list
> https://eng.registro.br/mailman/listinfo/masoch-l
>
--
Derick Fontes
dbfontes at gmail.com
More information about the masoch-l
mailing list