> So maybe mod_jk is handling the cfm before mod_alias has a chance to
> touch it?

Seems like a reasonable explaination to me.

However, I'm not sure what governs the execution order of Apache modules. I googled it a bit, and only found that Apache manages it using an "internal" process. great >.<

You could try using mod_proxy instead of mod_jk and place your mod_proxy directives under your alias directives. Perhaps they will get executed first?

Just a guess!

Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
509.593.4207 x 1001

On 04/28/2011 10:25 AM, Jari Ketola wrote:
On Thursday, April 28, 2011 7:14:17 PM UTC+3, denstar wrote:

    You can also check the tomcat logs and see where it's trying to serve
    the page from, but it sounds like something that Alan is getting at --
    tomcat is getting the request but isn't able to match it up to the
    right host.


Where should I look for Tomcat logs? I'm quite new to Tomcat, and all I
can see logged in catalina logs is rows like
Apr 28, 2011 5:08:17 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8888
Apr 28, 2011 5:08:17 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 28, 2011 5:08:17 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/21 config=null
Apr 28, 2011 5:08:17 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3569 ms

However I can see from BD debugs what's going on:

*File Not Found*
Request /blog/foobar/test.cfm


...
CF_TEMPLATE_PATH /www/blog/foobar/test.cfm
PATH_TRANSLATED /www/blog/foobar/test.cfm
...

So maybe mod_jk is handling the cfm before mod_alias has a chance to
touch it? Or maybe mod_alias can't even be used in this case since the
requests are just proxied to Tomcat and Apache doesn't actually handle
the physical files at all.

Directory tree:
www
`-- blog
|-- test.cfm
`-- test.html

# curl -s --head http://10.1.1.201/blog/test.html | grep HTTP
HTTP/1.1 200 OK
# curl -s --head http://10.1.1.201/blog/test.cfm | grep HTTP
HTTP/1.1 200 OK
# curl -s --head http://10.1.1.201/blog/foobar/test.html | grep HTTP
HTTP/1.1 200 OK
# curl -s --head http://10.1.1.201/blog/foobar/test.cfm | grep HTTP
HTTP/1.1 404 Not Found

Oh, and forgot from my reply to Alan, the VirtualHost directive from Apache:

<VirtualHost *:80>
ServerName 10.1.1.201
ServerAlias devsrv1.ad.local
DocumentRoot /www/
AliasMatch ^/blog/([a-z0-9_\-]+)/(.*)$ /www/blog/$2
</VirtualHost>

Thank you both for your replies and suggestions!

Jari

--
official tag/function reference: http://openbd.org/manual/
mailing list - http://groups.google.com/group/openbd?hl=en

--
official tag/function reference: http://openbd.org/manual/
mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to