Tomcat web server setup

Source: Internet
Author: User

Use tomcat to set up a VM:

Prerequisites: JDK has been installed on the machine.

First, when Tomcat is installed, the specified port is 80 because the default port is 8080.

1: Modify the hosts file. The file is located in

Windows 2000 is usually C:/winnt/system32/Drivers/etc

Windows 2003 and XP systems are usually C:/Windows/system32/Drivers/etc

Directory. By default, the file contains the following line:

127.0.0.1 localhost

Add the domain name you want to connect to, with the IP address (127.0.0.1) in front and the actual domain name as shown in Figure

127.0.0.1Www.bitding.cn

2: Modify the server. xml file in the C:/tomcat/conf directory. Find the  
<Host name = "www.bitding.com" DEBUG = "0" appbase ="Disk size:/file path">
<Context Path = "" docbase = "." DEBUG = "0"/>
</Host>

Note: The name is the domain name under the hosts file, and the appbase is the actual path of the project file. If you have multiple websites, you can add multiple websites, but the names cannot have the same value.

3: Add ***. XML to the C:/tomcat/CONF/Catalina/localhost directory.
 
<Context docbase ="Disk size:/file path"Path ="/Virtual path"
DEBUG = "0" reloadable = "true" crosscontext = "true">
</Context>

4: restart the Tomcat server and enter www.bitding.cn to access the server through the domain name.

 Note: the format of the disk width:/file path is (D:/123)

/virtual path format: (/123)

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.