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

279
Vistas
Is there some way I get 301 error while proxy_pass is returning 502 error?
location / {
   proxy_pass /newurl/;
}

location /newurl {
   return 303 /old/users;
}

I am trying to access / and getting 502 error, as my proxy to /newurl is returning an error 301. Is there some way I can proxy and get the 301 error with the same content to UI?

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

0

Instead of using proxy_pass take a look at the rewrite directive.

You are receiving the 502 error message because the proxy_pass directive in your snippet is not pointing to a valid URL.

location / {
 rewrite ^ /newurl break;
}
over 4 years ago · Santiago Trujillo Denunciar

0

I would suggest share a complete nginx block so we can see what you doing wrong

server {
    . . .
    server_name example.com www.example.com;

    rewrite ^/products.html$ /offer.html permanent;
    rewrite ^/services.html$ /offer.html permanent;
    . . .
}
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