Apache Proxy LocationMatch

Почему (виртуальный хост конф):

ProxyStatus Off
ProxyRequests Off
RewriteEngine on

<LocationMatch "/?(services/WeatherPort)$">
      ProxyPreserveHost on
      ProxyPass ajp://127.0.0.1:8080/$1
      ProxyPassReverse ajp://127.0.0.1:8080/$1
      RequestHeader set X-Forwarded-Proto https
      RequestHeader set X-Forwarded-Port 443
</LocationMatch>

матч и

<LocationMatch "^/(services/WeatherPort)$">
...same as above
</LocationMatch>

не соответствует -> 404 /services/WeatherPort не найден?

Когда я установил балансировщик

ProxyStatus Off
ProxyRequests Off

RewriteEngine on

Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Proxy balancer://srv-cluster>
  BalancerMember ajp://127.0.0.1:8080 route=01
  BalancerMember ajp://127.0.0.1:8081 route=02
  ProxySet stickysession=ROUTEID
</Proxy>

<LocationMatch "^/(services/WeatherPort)$">
  ProxyPreserveHost on
  ProxyPassMatch balancer://srv-cluster/$1
  ProxyPassReverse balancer://srv-cluster/$1
  RequestHeader set X-Forwarded-Proto https
  RequestHeader set X-Forwarded-Port 443
</LocationMatch>

это соответствует.

Apache / 2.4.25

0 ответов

Другие вопросы по тегам