Apache in front of tomcat on Railo proxy with ajp
- by user1468116
I'm trying to setup apache in front of the tomcat embedded in railo.
I have this settings:
<VirtualHost *:80>
DocumentRoot "/var/www/myapp"
ServerName www.myapp.test
ServerAlias www.myapp.test
ProxyRequests Off
ProxyPass /app !
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPassReverse / ajp://%{HTTP_HOST}:8009/
RewriteEngine On
# If it's a CFML (*.cfc or *.cfm) request, just proxy it to Tomcat:
RewriteRule ^(.+\.cf[cm])(/.*)?$ ajp://%{HTTP_HOST}:8009/$1$2 [P]
My server.xml :
<Host name="www.myapp.test" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/var/www/myapp" />
<Alias>myapp.test</Alias>
</Host>
The index is loaded, but if I try to load some internal page I got:
The proxy server could not handle the request GET /report/myreportname.
Reason: DNS lookup failure for: localhost:8009report
Could you help me?