MatchExpression Defined For One Virtual Host in Apache Also Applies To All Of The Virtual Hosts Running (Doc ID 1395641.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Weblogic Server - Version 10.3 and later
Information in this document applies to any platform.

Symptoms

If ANY of the virtual hosts contain MatchExpression then this directly applies to all of the virtual hosts running. With the result, if we hit one virtual host for some static content (expecting apache to serve the content from document root for example because of rule, set locally, using MatchExpression ) the request can get passed to backend application server due other MatchExpression rule defined for some other virtual host altogether. We will get 404 Not Found.

Example for a test and result is below :
If my httpd.conf fragments is :

Listen 48080
NameVirtualHost *:48080

<VirtualHost *:48080>
ServerName defaultservername
</VirtualHost>

<VirtualHost *:48080>
ServerName test1:48080
<IfModule mod_weblogic.c>
WebLogicHost localhost
WebLogicPort 7001
MatchExpression *.jsp
</IfModule>
</VirtualHost>

<VirtualHost *:48080>
ServerName test2:48080
<IfModule mod_weblogic.c>
WebLogicHost localhost
WebLogicPort 7001
MatchExpression *
</IfModule>
</VirtualHost>

The result should be :

http://test1:48080/webapp1/test.jsp ->OK
http://test2:48080/webapp1/test.jsp ->OK
http://test1:48080/webapp1/testservlet2 ->404 Not Found
http://test2:48080/webapp1/testservlet2 ->OK

 

In some cases , we can also see the below error message on the Web Browser:

"Failure of server APACHE bridge:
Neither cluster nor server host parameter was specified in httpd.conf.  Cannot continue."

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms