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