I know that there are possible duplicates on serverfault, but I read a lot (not only the last days) but I couldn't make it working 100%.
I have the domain http://jetwick.de bought via Strato and then I have a server with a static IP. I can configure the DNS settings for jetwick.de at Strato: the IP directly points to the IP of our server via A-Record. This works.
Now I want that my application which is available from tomcat under localhost:8080/jetwick is shown under jetwick.de - nothing more :)
I have the following apache config on our server /etc/apache2/vhosts/jetwick
<Virtualhost *:80> ServerName http://jetwick.de ServerAlias jetwick.de www.jetwick.de jetwick.com www.jetwick.com ProxyRequests Off ProxyPreserveHost On ProxyPass / http://localhost:8080/jetwick/ ProxyPassReverse / http://localhost:8080/jetwick/ </Virtualhost>
This partially works. But I have problems when I query:
- jsessionid should NOT be shown - only for clients which do not allow cookies. I guess the cookie info gets lost somewhere like the favicon ...?
- an additional directory jetwick.de/jetwick will be shown (in the following request the jsessionid disappears)
How would you fix that? You can also point me to a site/duplicate where this case is described, of course!
Do I need mod_jk to make cookies properly working like the answer here suggests?
Update The following settings solved the first (cookie) problem:
ProxyPassReverseCookiePath /jetwick /