Chris Blackwell wrote:
...


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

Bad idea, almost always...

 ServerName mysite.dev

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
http://mysite.dev:8080/CFIDE/administrator/index.cfm 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to