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

242
Vistas
http request forwarding according to the http header in apache

I have an apache server that gets http requests with 3 different headers. Depending on the header, I have to send it to backend servers.

Url : abc.com/check

Headers :

"Content-Type: app1"

"Content-Type: app2"

"Content-Type: app3"

Depending on the above header , the request has to be sent to backend app servers .

server1 : http://server1/s1 if "Content-Type: app1"

server2 : http://server1/s2 if "Content-Type: app2"

server3 : http://server1/s3 if "Content-Type: app3"

Please help me out .

Thanks.

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

0

I figured it out .Below snippet works our requirement. Some enhancements I'm thinking is to allow only POST requests .

<VirtualHost abc.com:80>
       ServerName abc.com

     RewriteEngine On
     RewriteCond %{HTTP:Content-Type} "app1"
     RewriteRule ^/check http://server1/s1 [P,L]

     RewriteCond %{HTTP:Content-Type} "app2"
     RewriteRule ^/check http://server1/s2 [P,L]

     RewriteCond %{HTTP:Content-Type} "app3"
     RewriteRule ^/check http://server1/s3 [P,L]

</VirtualHost>
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