C: \ windows \ system32 \ drivers \ etc
Hosts file under
Changed:
127.0.0.1 localhost
127.0.0.1Www.greenmood.net
127.0.0.1 www.cms4j.cn
Tomcat server. xml file
Add
<Host name ="Www.greenmood.net"Appbase =" greenmood"
Unpackwars = "true" autodeploy = "true">
<Valve classname = "org. Apache. Catalina. Valves. accesslogvalve" directory = "logs"
Prefix = "greenmood_access_log." suffix = ". txt"
Pattern = "% H % L % u % T & quot; % R & quot; % S % B"/>
</Host>
Autodeploy = "true" automatic deployment --- "detects updates to Tomcat files, that is, directly modify the deployed files.
Hosts is a system file without an extension. It can be opened using notepad and other tools. Its function is to associate some common website domain names with their corresponding IP addresses to a "Database ", when a user enters a URL in the browser to log on to, the system will first automatically find the corresponding IP address from the hosts file. Once found, the system will immediately open the corresponding webpage. If not found, the system then submits the website address to the DNS domain name resolution server for IP Address Resolution.
Access address -------------> www.greenmood.net: 8080