I've apache2 and tomcat6 running on port 80 on ubuntu server 9.10. I've a registered domain name and I'll access the jsp index page navigating to http://abc.mydomain.com. The page is under tomcat_home/webapps/myapp and the below are tomcat virtual hosting in server.xml file:
<Host name="abc.mydomain.com" debug="0" appBase="webapps" unpackWARs="true"> <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="virtual_log1." suffix=".log" timestamp="true"/> <Context path="" docBase="/usr/share/tomcat/webapps/myapps" debug="0" reloadable="true"/> </Host>
Recently a new domain has been bought(xyz.mydomain.com) and I'm asked to do the virtual hosting so that the new domain name directly points the page "admin.jsp" which is located under 'tomcat_home/webapps/myapps/WE-INF/js/'(can be accessed pointing to http://abc.mydomain.com/admin). How could I do this?
If I type http://abc.mydomain.com/admin I'll get the page what I wanted. I should access this page just by typing http://xyz.mydomain.com. Is there any url redirection or I could define any alias in tomcat virtualhosting?. Need help...