tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: tomact, apache & adobe coldfusion 9
Date Fri, 30 Oct 2009 15:43:17 GMT
Chris Blackwell wrote:

> <VirtualHost *:80>
> DocumentRoot "C:\Users\Chris\Documents\Eclipse Workspace\mysite"

Bad idea, almost always...

>  ServerName
> ProxyPreserveHost On
> ProxyPassReverse / ajp://localhost:8009/
> RewriteEngine On
> # If it's a CFML (*.cfc or *.cfm) request, just proxy it to Tomcat:
>  RewriteRule ^(.+\.cf[cm])$ ajp://localhost:8009$1 [P]
> </VirtualHost>
> Ok so this seems to work, apart from one really annoying snag.  in the
> coldfusion war theres a directory call CFIDE which contains amongst other
> things the administrator.  I can browse to
> and it happily shows me
> the login screen, however if it try to access that directory through apache
> it sends me the source code for the file. 

.. and that's why.

With your above RewriteRule, you are intercepting and proxying to Tomcat 
/some/ URLs.  The ones you are not intercepting and proxying with the 
rule, go through to Apache, which serves them normally as files, using 
its DocumentRoot as the base.
So, probably, if you request "http://yourhost/ROOT/WEB-INF/web.xml", 
you'll also see the contents of the file 
(tomcat_dir)/webapps/ROOT/WEB-INF/web.xml, including anything in it that 
you would not want users to see (passwords etc..).

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message