I'm currently facing interesting problem which I cannot resolve. I have an Apache2 as a proxy to Tomcat. The proxy configuration looks like:
<Proxy *> Order deny,allow Allow from all </Proxy> ProxyRequests Off ProxyPreserveHost On ProxyPass /myApp http://localhost:8080/myApp ProxyPassReverse /myApp http://localhost:8080/myApp
Everything works fine, the problem come with AJAX within my application. When I go to myApp url: http://myurl.com/myApp I can access ajax only using the same url. When I use www url prefix (http://www.myurl.com/myApp) for AJAX the ajax content is not loaded (apache logs HTTP 302). This also doesn't work vice versa. I'm pretty sure that I can correct it in Apache, but I don't know how. Do you have any suggestion?
Thanks for any help,