So the problem with the AJP turned out to be that it was doing a dns
lookup outside the server and trying to access the
domain.com:8009 by
the ip address that it was pointed to initially. After some time it
would eventually resolve correctly. So the solution, thank you Jamie
Krug, was to use a <virtualhost *:80> and to set the domains in the
etc/host file to point to the domain so that it didn't have to look
outside to resolve, 127.0.0.1
domain.com. That seemed to get rid of
the error and everything is smoothly working on the server! Also,
inside the vhost for apache, we would ProxyPassReverse to ajp://localhost:8009/
since ProxyPreserveHost was set to On which according to Jamie would
preserve the host name, which it did. An example of a vhost that
reverse ajp to a mura site on tomcat looks like this:
<VirtualHost *:80>
ServerAdmin
em...@email.com
DocumentRoot "C:/wwwroot/mura"
ServerName
mura.mysite.com
ErrorLog logs/mura-error_log
CustomLog logs/mura-access_log common
<Directory "C:/wwwroot/mura">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Proxy *>
Allow from 127.0.0.1
</Proxy>
ProxyPreserveHost On
ProxyPassReverse / ajp://localhost:8009/
RewriteEngine On
# Forbid access to Railo Admin URLs:
RewriteRule ^/railo-context/admin/(.*) - [F]
# Proxy "secret" Railo Admin URLs to "real" Railo Admin URLs on
Tomcat:
RewriteRule ^/SOMETHING-DIFFICULT-TO-GUESS/admin/(.*\.cf[cm])$
ajp://localhost:8009/railo-context/admin/$1 [P]
# If it's a CFML (*.cfc or *.cfm) request, just proxy it to
Tomcat:
RewriteRule ^(.+\.cf[cm])(/.*)?$ ajp://localhost:8009$1$2 [P]
# If trailing slash and real directory, then append index.cfm and
proxy it to Tomcat/Railo:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^(.+/)$ ajp://localhost:8009%{REQUEST_URI}index.cfm
[P]
# If it's a real file (and we haven't proxied to Tomcat, so it
must be static), just serve it:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f
RewriteRule . - [L]
# NOTE: Everything else must be a CMS URL path (letters/numbers/
hyphens/slashes only), or a 404...
# Require trailing slash at this point, if otherwise valid CMS
URL:
RewriteRule ^([a-zA-Z0-9/-]+[^/])$ $1/ [R=301,L]
# Valid CMS URL path is proxied to Tomcat/Railo:
# MUST COME AFTER ANY OTHER FIXED/EXPECTED REWRITES!
RewriteRule ^([a-zA-Z0-9/-]+)$ ajp://localhost:8009/index.cfm%{REQUEST_URI}
[NE,P]
# Anything else must be a 404 error:
RewriteRule . ajp://localhost:8009/index.cfm/this-will-force-a-404/
[NE,P]
</VirtualHost>
Jamie did advise me that he will be blogging "a slightly simplified
VirtualHost and Apache setup, in general" that will be simpler than
the example i pasted above, but for now it can't hurt to have this
example as it was what he originally provided us on his blog.
I hope this helps anyone else that runs into the same problem, looks
like it is resolved with the tweaks!
Thank you for the responses everyone!