Files/Location Matching Problem

Giganews Newsgroups
Subject: Files/Location Matching Problem
Posted by:  jesdynf (jesdy…
Date: Sat, 12 Jun 2010

I'm missing something very simple. I'm working with an Apache/Tomcat
setup, trying to get Apache to hand off Railo CF templates to Tomcat.
But there's something I just don't get with the matches -- I can't
seem to match cfm files.

The problem isn't the proxying -- my ProxyPass / ProxyPassReverse
statements are solid, and the Location /railo-context directive down
there works fine. Everything under /railo-context (which doesn't
actually exist in the document root -- Tomcat knows where it is) runs

If I issue a Location / statement and just have Apache proxy
everything, *that* works fine too. But any attempt to confine the
proxy to CFM files fails on me -- Apache just returns the source text.
I've confirmed (by removing the proxy statements and replacing them
with SetHandler) that it's the match, not the proxy.

Location /index.cfm works.
Location *cfm doesn't.
Location ~ .*cfm doesn't.
LocationMatch .*cfm doesn't.
LocationMatch .*cfm$ doesn't.
LocationMatch /index.cfm works.
LocationMatch /index*cfm doesn't.

Files and FilesMatch work and don't work exactly the same way.

Apache 2.2 (Debian stable) for reference. I've reproduced the
VirtualHost directive below. Thanks for any help you can offer!

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName kislev
        DocumentRoot /var/www/kislev/

        ProxyRequests Off
        <Proxy *>
                Order allow,deny
                Allow from All

        <Location /railo-context>
                ProxyPass ajp://localhost:8009/railo-context/
                ProxyPassReverse http://kislev/railo-context/

        # grr!
        <Files /index.cfm>
                ProxyPass ajp://localhost:8009/
                ProxyPassReverse http://kislev/

        <Directory />
                Options FollowSymLinks
                AllowOverride None
                Order allow,deny

        <Directory /var/www/kislev>
                Allow from all

        <Directory /var/www/kislev/WEB-INF>
                Deny from All

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined