At the beginning, I didn't know how to access my deployment directly through the domain name Web project , Published in the Tomcat Upper . Because I used to write after the project name , Then go to Baidu and Google , Found the right way to
If you don't want to enter the port number to access , Remember to put the port number 8080 Change it to 80 Oh .
apache-tomcat-7.0.73/conf/server.xml In file
1、 Change the project name to ROOT that will do ( If any, delete the previous ROOT project )
2、 modify tomcat Of server.xml file Location :apache-tomcat-7.0.73/conf/server.xml
The original document is ：
It is amended as follows ：
That is to say, we added :
<Context path="/" docBase="/tomcat/apache-tomcat-7.0.73/webapps/myBlog" reloadable="false" allowLinking="true"></Context>
path=”/”,/ It means that you don't need to add a project name when you visit a project .
/tomcat/apache-tomcat-7.0.73/webapps/myBlog Absolute path for my project . myBlog For my project name .
So you OK 了 .
The environment is Linux– CentOS 6.5 64 position Tomcat7 JDK7
This article is written by [ Familiar with memory ] To write , All rights reserved .
Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .