Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

312
Visualizações
(Nginx Windows) nginx: [emerg] unknown directive "serversupstream"

I got this code while executing nginx:

nginx: [emerg] unknown directive "serversupstream" in C:\nginx-1.17.9/conf/nginx.conf:15

This is my nginx.conf:

#user  nobody;
worker_processes  1;
events {
  worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    #tcp_nopush     on;
    #keepalive_timeout  0;
    keepalive_timeout  65;

    # List of application 
    serversupstream portal_server {
      server 127.0.0.1:9510;
    }
    upstream portal_web_server {
      server 127.0.0.1:8085;
    }
    server {
      listen       8001;
      server_name  localhost;
      location /api {
          proxy_pass <http://portal_server;>
          proxy_http_version 1.1;
          proxy_redirect     off;
          proxy_set_header Host               $host;
          proxy_set_header X-Real-IP          $remote_addr;
          proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto  $scheme;
      }
      location /dte {
          proxy_pass <http://portal_web_server;>
          proxy_http_version 1.1;
          proxy_redirect     off;
          proxy_set_header Host               $host;
          proxy_set_header X-Real-IP          $remote_addr;
          proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto  $scheme;
      }
      location /simulacion {
          proxy_pass <http://portal_web_server;>
          proxy_http_version 1.1;
          proxy_redirect     off;
          proxy_set_header Host               $host;
          proxy_set_header X-Real-IP          $remote_addr;
          proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto  $scheme;
      }
    }
    include servers/*;
}

I don't know that error message, what it is?

EDIT:

According to http://nginx.org/en/docs/dirindex.htm there is no serversupstream I don't understand, I'm just using a nginx.conf that many other guys in the team are using, but they are on mac and/or linux, I'm the only one in Windows.

So, I change serversupstream to upstream and there it triggers another error, it's complaining about the prefix for:

proxy_pass <http://portal_web_server;>

So I change removed those <> and there I tried again, now nginx doesn't show anything in the console... just this:

enter image description here

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

change encoding of the configfile to Utf8. Don't use built'in Notepad.exe to Save as to Uft8, it will save as Utf8 BOM. Use Notepad++ or other editor.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda