Apache in front of tomcat on Railo proxy with ajp
Posted
by
user1468116
on Server Fault
See other posts from Server Fault
or by user1468116
Published on 2013-11-03T11:54:38Z
Indexed on
2013/11/03
15:56 UTC
Read the original article
Hit count: 336
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?
© Server Fault or respective owner