Question

I am facing issue when trying to add exclusions using WLExcludePathOrMimeType for weblogic module in Apache Web Server 2.2.25. I am using Weblogic 12c. Following is the excerpt from the httpd.conf.

<IfModule mod_weblogic.c>
    WebLogicHost <host_name>
    WebLogicPort 9001
    MatchExpression *.jsp
    MatchExpression *.controller
    MatchExpression /dummy/*
    WLExcludePathOrMimeType *.json
    WLExcludePathOrMimeType *.html
    WLExcludePathOrMimeType *.png
    HungServerRecoverSecs 3600
    ConnectTimeoutSecs 25
    ConnectRetrySecs 2
    Debug OFF
</IfModule>

The problem is, for the exclusion it only excludes the last entry i.e. *.png in this case. I have tried giving comma separated list like

WLExcludePathOrMimeType *.json,*.html,*.png

In this case, it only picks up the first entry i.e. *.json. I am not sure if it's a bug with the mod_wl plugin or there's a problem with the syntax. Any help/workaround would be appreciated.

Just to add, WLExcludePathOrMimeType with comma separated list works fine with IIS as Web Server and Weblogic combination.

Was it helpful?

Solution

Solved the issue by adding a separate Location tag in httpd.conf

<Location /dummy>
    SetHandler weblogic-handler
    WLExcludePathOrMimeType *.json,*.html,*.png
</Location>
<IfModule mod_weblogic.c>
    WebLogicHost <host_name>
    WebLogicPort 9001
    MatchExpression *.jsp
    MatchExpression *.controller
    MatchExpression /dummy/*
    HungServerRecoverSecs 3600
    ConnectTimeoutSecs 25
    ConnectRetrySecs 2
    Debug OFF
</IfModule>

Interestingly, in the documentation of old version of weblogic plugin, it's actually mentioned that WLExcludePathOrMimeType takes comma separated list (http://docs.oracle.com/cd/E13222_01/wls/docs81/plugins/plugin_params.html#1143055). While in the newer documentation, it has been skipped (http://docs.oracle.com/cd/E13222_01/wls/docs103/plugins/plugin_params.html#wp1143055)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top