A Sysadmins blog

I once was 404, but now am 200.

Archive for the ‘apache’ tag

Un-mapping a path from mod_jk in Apache

without comments

We have a few legacy servers at $work where they still use mod_jk and mod_jk2. Unfortunately for us one of these was setup by the client’s admins who did not like to configure tomcat context mappings within the virtual host that only needed them. This has the affect of sending many more URLs to tomcat/jboss than necessary.

One way to get around this when you cant change those mappings is to use the SetEnv module.

In the virtual host where you want to exclude certain paths from being mapped, add the following entries and reload the config.

        # Disable global mod_jk mapping that break stats.
        SetEnvIf Request_URL "/stats*" no-jk
        SetEnvIf Request_URL "/awstats*" no-jk

Written by pdeaudney

October 29th, 2008 at 1:49 pm

Posted in tomcat

Tagged with , , ,