Score:0

Apache sort order and preventing merging using the location directives in virtual server

ru flag

I have two locations, one of which is a subset of the other. I would like the match to be either/or. However, in the more specific path, it appears to match both and merge the potential weblogic destinations. The desired behavior is it it matches /alpha/beta to go to location X. If it doesn't match /alpha/beta, but still has the root of /alpha to go to location Y.

<VirtualHost *:10000>
  ServerAdmin root@localhost
  Options -Indexes -ExecCGI -FollowSymLinks -Includes -Multiviews -IncludesNoExec -SymLinksIfOwnerMatch
  ServerName test-ws.amberroad.com

  <IfModule mod_weblogic.c>
    DebugConfigInfo OFF
    Idempotent OFF
    KeepAliveEnabled ON
    WLIOTimeoutSecs 720
    ConnectTimeoutSecs 720
    WLSocketTimeoutSecs 720
    ConnectRetrySecs 0
  </IfModule>

  <Location /alpha>
    WLSRequest On
    WebLogicHost 10.10.10.10
    WebLogicPort 10002
  </Location>

  <Location /alpha/beta >
    WLSRequest On
    WebLogicCluster 10.10.10.10:10001,10.10.10.10:10000
  </Location>

  ErrorLog "|/opt/freeware/sbin/rotatelogs /wslog/error_log.10000_%a 86400"
  CustomLog "|/opt/freeware/sbin/rotatelogs /wslog/access_log.10000_%a 86400" common

</VirtualHost>

Mr R avatar
cn flag
HI @Slodog - have you tried putting /alpha/beta before /alpha - so it's dealt with first??
Slodog avatar
ru flag
Thanks Gerard. I did try switching order, both before and after your suggestion. At least with a graceful restart, I don't see any change in behavior.
Mr R avatar
cn flag
What do the access and error logs show?
Slodog avatar
ru flag
On the proxy server error log, I see one occurene of the following today: [Mon Jun 21 03:48:16.353751 2021] [weblogic:error] [pid 26084154:tid 6940] [client 192.168.231.101:16353] ap_proxy: trying POST /alpha/beta at backend host 10.10.10.10/10002; got exception 'Backend Server not responding'; state: reading status line or response headers from WLS (wrote? Y read? N); not failing over. On the application server access logs from today, I am not seeing any /alpha/beta being directed to port 10000 or port 10001. All traffic is currently being directed to port 10002.
Slodog avatar
ru flag
The above behavior occurs with /alpha/beta preceading /alpha in the list of locations.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.