How to setup domain name to ipaddress/webapp1/webpage?
I purchased a domain name (www.domainname.com) in godaddy. I have a tomcat server deployed working application at path http://174.xxx.x.xx/WebApp1/webhome
When开发者_运维百科 I create an AList in godaddy that accepts only ip address. So,after setting up AList, my application is reachable only by typing: www.domainname.com/WebApp1/webhome. If I type just www.domainname.com it doesnt work.
I just want to type www.domainname.com and bringup my application instead of typing www.domainname.com/WebApp1/webhome.. 1) should I do any config change in tomcat server ? 2) Or should I just use forward instead of AList in godaddy?
thanks
check your public html folder, you can create an index.html, with the following code
<meta HTTP-EQUIV="refresh" CONTENT="0;URL=www.domainname.com/WebApp1/webhome">
in the header.
or you can change web.xml
under tomcat conf folder
<welcome-file-list>
<welcome-file>./yourpath/yourpath/webaindex.jsp</welcome-file>
</welcome-file-list>`
Finally I fixed it by 1)renaming WebApp1.war to ROOT.war and deployed again. 2) creating AList record to ip address.
thanks
精彩评论