Tomcat configuration with IP address [without port number and project name][tomcat AppBase and Docbase differences]

Source: Internet
Author: User
Tags i18n

Main configuration server.xml files in tomcat/conf directory

1. Change the default 8080 port to 80 port first

<connector connectiontimeout= "20000" port= "protocol=" http/1.1 "redirectport=" 8443

Note: Set the port= "80" of the connector node

2. Configure project Directory Access

 
	<context path= "docbase=". "/>
	<context path= "/i18n" docbase= "."/>
</Host>

Note: Set the host node's name= "localhost", name is to set access mode, with localhost access, this machine directly use localhost access on the line, other IP address directly through the local IP address can be accessed. Appbase= "webapps/i18n", WebApps the application directory, where the relative directory of webapps/i18n is set. The project absolute path is the project directory for the I18N deployment under the Tomcat installation directory]c:/tomcat/webapps/i18n, which is webapps under Tomcat.


The difference between AppBase and docbase in Tomcat

 

The AppBase directory says: 1. Subdirectories below this directory will automatically be deployed as applications. 2. The. War file under this directory will be automatically decompressed and deployed as an application.
The Docbase directory represents:
A directory that points to an application.
If you want to specify the path, then you should write it in Docbase if you feel trouble, copy it directly under AppBase.
If you repeat the two directory settings and point to the same directory, it looks like it will work, but each subdirectory below your application is actually deployed as a standalone application.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.