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

571
Visualizações
Nginx: How to map the internal Ip addresses and proxy using ngrok without redirecting

I have two device which can be accessed only using internal network.

To access it externally i have installed nginx in raspberry device and added a redirect within nginx like

location /device1 { return 301 http://192.168.0.1:80 }

Similarly device2 i have added and now i have used ngrok and exposed the localhost:80 externally.

Problem: If i am in the same network of device1 and device2 i am able to connect it.

If i change my network i am able to access the nginx default page.

Now If i append device1 it says page not found.

Solution Required:

How do i connect device1 and device2 from different network.?

Why is this required say for example i am running a application in amazon i want to connect to my internal device ip and access the data.

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

0

You need to use nginx as reverse proxy for that. The very minimal configuration is

location /device1/
{
  proxy_pass http://192.168.0.1/;
}

With this configuration request GET /device1/some/other/path will reach your device as GET /some/other/path. If you remove the trailing slash of http://192.168.0.1/ string, same request will reach your device as GET /device1/some/other/path. What you are trying to do commonly called "proxying something under some URI prefix", and depending on what you are proxying under this prefix, there can be various issues.

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