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)