> From: JDawg72 [mailto:mr.j....@hotmail.com] > Subject: Virtual host configuration problems > > That being said, I am having a problem configuring my web application > to load when I type www.mydomain.com in my browser address bar. > My application does work as long as I type www.mydomain.com/myapp > for the url.
If you're on a reasonably recent version of Tomcat, the default webapp must be named ROOT (case sensitive). You didn't explicitly tell us the version of Tomcat you're using, although the config indicates it's probably 5.5.26; please confirm that, and let us know what JVM you're using and what OS. > I have tried changing my server.xml host context and > WEB-INF/context.xml with no luck. The context.xml file belongs in META-INF, not WEB-INF; let's hope the above was a typo, since you do refer to META-INF later. > <Context > docBase="/usr/local/tomcat/apache-tomcat-5.5.26/server/webapps/admin" > path="/admin" > privileged="true" > reloadable="true"> > </Context> > <Context > docBase="/usr/local/tomcat/apache-tomcat-5.5.26/server/webapps/manager" > path="/manager" > privileged="true" > reloadable="true"> > <ResourceEnvRef > name="users" > type="org.apache.catalina.UserDatabase"/> > </Context> > <Context > docBase="/home/userId/public_html/myapp" > path="" > reloadable="true"> > </Context> <Context> elements should not be placed in server.xml; that's extremely poor practice left over from older versions of Tomcat. What you have above is a real mess; remove the <Context> elements from server.xml and place them where they belong. For the webapps stored outside of the appBase directory (admin and manager), this should be conf/Catalina/mydomain.com/[appName].xml. Your default webapp should be located in /home/userId/public_html/ROOT - nowhere else, and its <Context> element should be in /home/userId/public_html/ROOT/META-INF/context.xml. Also note that if you have a single <Host>, it's not necessary to give it your domain name or supply any aliases; using the default of "localhost" will be fine. I would configure an HTTP <Connector> to allow testing of Tomcat without the complication of using httpd in front of it. (In fact, if you're not using httpd for something useful - such as PHP - get rid of it; it's only making things more complicated and slowing you down.) > META-INF/context.xml Where is the above directory located? > <Context path="/myapp" docBase="myapp" reloadable="true" The path and docBase attributes are not allowed when the <Context> element is in a webapp's META-INF/context.xml file. Fix all of the above and see what happens. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org