Hi. This is a simple question (i think)
After playing with server,xml (and various other .xml files) I am unable to work out how to host multiple domains on a Tomcat 6 (standalone) server (running on port 80) .. I have read - http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html I.e - I have uploaded 2 contexts /mrpink /mrblue - mrpink was uploaded first (as root context). - I have 2 domains www.mrpink.com www.mrblue.com - both domains point to the same ip (tomcat server) - however when visiting both sites they go to the ROOT context. - I want www.mrpink.com to go to www.mrpink.com/mrpink and www.mrblue.comto go to www.mrblue.com/mrblue - how is this possible ? Please note : that both contexts are fine when you put the URL in (i.e www.mrpink.com/mrpink) - I just want Tomcat to understand when you visit www.mrpink.com to automatically goes to www.mrpink.com/mrpink I have tried editing server.xml (as shown in above link) also tried using the tomcat host-manager - every time I try to use this I get file/folder not found when visiting the page - i.e the host-manager seems to work fine but visiting the page after adding a virtual host i get a blank page (in firefox) - file/folder not found in konqueror .... Here is an example I tried - to get www.mrblue.com to point to www.mrblue.com/mrblue using the host-manager.... - First I uploaded the mrblue tomcat application using the tomcat manager.. Using host-manager ... www.mrpink.com/host-manager/html name : mrblue.com alias : www.mrblue.com app base : /opt/tomcat/webapps/mrblue/ The webapp is located in - /opt/tomcat/webapps/mrblue/ I understand I can do what I want using mod_jk - however it seems crazy using apache when I do not really need to ... Can anyone help - its slowly driving me mad.............. Cheers