My Tomcat / TomEE is also fronted with Apache. I was using the following
proxy config (removed some parts that are not relevant for this problem) so
Tomcat had to decide what to do with "domain.com" requests, i.e. to map them
to the Domain.war application in context "/Domain":
<Virtualhost *:80>
ServerName domain.com
ServerAlias *.domain.com
Alias /img/ /var/www/domain/img/
<Directory /var/www/domain/img/>
# Here I define expires headers for images
</Directory>
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Prevent domain.com/img from being served by Tomcat
ProxyPass /img !
# Pass all other requests to Tomcat / TomEE
ProxyPass / ajp://localhost:8009/
</Virtualhost>
This is still working to the point, that I can access my application via
http://domain.com/Domain. Since the virtual host didn't work in TomEE, I
first tried "ProxyPass / ajp://localhost:8009/Domain" - but then a request
to domain.com results in "HTTP Status 404 - /DomainDomain/". If it can be
done in the Apache host config, that would be okay as long as I don't have
to change any URLs in my application.
--
View this message in context:
http://openejb.979440.n4.nabble.com/Virtual-host-not-working-tp4662204p4662260.html
Sent from the OpenEJB User mailing list archive at Nabble.com.