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

182
Visualizações
Changing web app's base url into host's subdomain

I want to deploy some web applications on different ports on the same host, with nginx reverse proxy.

So my configuration file is like this;

server_name         foo.bar.com

location /app1/ {
    proxy_pass      http://127.0.0.1:5000/;
}

location /app2/ {
    proxy_pass      http://127.0.0.1:6000/;
}

...

They work mostly fine, but there's a problem with one app.

It's a nodejs application and it has some functions like location.href = "/baz" that change current session's url from http://foo.bar.com/app into http://foo.bar.com/baz and cause Not Found errors.

That application is quite complicated and not written by me, so modifying it is quite hard.

Is there any way to change the application's base url into http://foo.bar.com/ so that make it work as http://foo.bar.com/app/baz, not http://foo.bar.com/baz?

over 4 years ago · Santiago Trujillo
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