Getting Started: Tomcat 5 site Server.xml settings

Source: Internet
Author: User
Server|xml

The smallest server.xml configuration file for Tomcat 5 is probably as follows:

<server port= "8005" shutdown= "Shutdown" >
<service name= "Catalina" >
<connector port= "8080"/>
<engine name= "Catalina" defaulthost= "localhost" >
<context path= "/bbs" docbase= "Bbs_file"/>
Modified </Host>
</Engine>
</Service>
Ten </Server>

The 3rd line sets the Tomcat listener port. If you want to visit a website on your own machine, enter http://localhost:8080 in the browser.

Host is a virtual hosting, is generally a Web site. The context represents a Web application (Web application), such as a message board for a Web site, and a forum can be a Web application respectively.

Appbase= "/home/ideawu/webapps" means that your site's programs are placed in the/home/ideawu/webapps directory, and you can also use the path relative to the Tomcat installation path, but generally do not.

Path= "/bbs" docbase= "Bbs_file" represents a Web application with a directory of Bbs_file, the program's files are placed in the/home/ideawu/webapps/bbs_file directory, you can go through http:// Localhost:8080/bbs or http://localhost:8080/bbs_file access. In other words, path is a map of docbase.

The homepage of your website should be placed in the/home/ideawu/webapps/root directory by default, you can set the path of the context to the empty string to change.



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.