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

174
Visualizações
Precedence of Apache <Location> directives?

We are using Apache 2.4.48 and a module that Oracle provides (the "WebLogic Plugin for Apache" - I guess equivalent to ProxyPass/ProxyPassReverse, but more WebLogic specific) to proxy some endpoints that are on WebLogic server. The configuration was setup awhile ago, and I am trying to understand the behavior of the directive.

In the Apache ssl.conf, we have (for example):

<VirtualHost _default_:443 _default_:14101>

<Location />
  WLSRequest On
  SetHandler weblogic-handler
  WebLogicCluster XXX01.foo.com:14101,XXX02.foo.com:14101,XXX03.foo.com:14101,XXX04.foo.com:14101
  WLCookieName OAMSESSIONID
  SecureProxy ON
  WLSSLWallet "/apps/products/apache/2.4.46/instances/apache_oam/conf/certs/wallet"
  #RequireSSLHostMatch false
  Debug OFF
  WLLogFile "/apps/products/apache/2.4.46/instances/apache_oam/logs/oam_location.out"
</Location>

<Location /service/show>
  SetHandler default-handler
  WLSRequest Off
  AuthType None
  Require all granted
  Header always set Access-Control-Allow-Origin %{ACAO}e env=ACAO
  Header always set Access-Control-Allow-Credentials "true"
  Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS"
  Header always set Access-Control-Allow-Headers "Origin, Content-Type, Accept, Authorization"
</Location>
.
.
.
### Cert Check ###
ScriptAlias /certcheck "/apps/products/apache/instances/apache_oam/cgi-bin/certcheck"
<Location /certcheck>
  SSLVerifyClient optional_no_ca
</Location>
### End Cert Check ###

</VirtualHost>

I (probably mistakenly) always thought that, in Apache configuration, the more specific directive would take precedence over the less specific, but, when I test with the above, the

<Location /> 

appears to cause EVERY request to be proxied to the backend servers, even though the "<Location /certcheck>" is "more specific".

Because of this, the /certcheck, which is supposed to be a local resource, is causing the request to be proxied to the backend, instead of serving from the local resource.

Can someone explain why this is happening?

Also, if what we WANTED was to proxy every request/URI UNLESS we specify the URI in a "<Location /xxxx>", how can we accomplish this?

Thanks, Jim

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