Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

233
Vistas
How to reverse proxy app in a subdirectory?

I'd like to reverse proxy my application under server.com/myapp/homem where server.com/myapp is the proxied address and /home is an URL handled by my app.

What is the best / recommended solution to do that so that the app will generate proper paths<img src="/myapp/static/...">

Which of the two following approaches I should take: 1. X-Forwarded-Path: I proxy GET Path=/home and add an X-Forwarded-Path: /myapp 2. Base_url set in config: I proxy GET Path=/myapp/home and set base_url = server.com/myapp

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The nginx rewrite directive can handle what you are looking for

You server block should look similar to the following snippet

server {
    listen 80;

    rewrite ^/myapp/(.*)$ /$1 last;

    location /home {
        proxy_set_header X-Forwarded-Path myapp;
        proxy_pass http://1.2.3.4;
    }
}

Take a look at either of the following for more information

  • https://www.nginx.com/blog/creating-nginx-rewrite-rules/
  • http://nginx.org/en/docs/http/ngx_http_rewrite_module.html
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda