Tomcat domain name mapping

1. The tomcat port is changed from 8080 to 80

Find the server.xml file under D:\work\apache-tomcat-7.0.62\conf  and change the port 8080 to 80

2. Find the file hosts file under C:/WINDOWS/system32/drivers/etc 

Open, add:

E.g,

127.0.0.1       www.xingyx.com

Remember: the hosts file only controls domain name mapping, regardless of ports. The above is for mapping domain names. Only servers such as tomcat and glassfish control whether the export uses 80 or 8080. For example, if tomcat1 uses port 8080 and is enabled, and the hosts file maps 127.0.0.1 www.xingyx.com, then 127.0.0.1:8080 and www.xingyx.com:8080 can be used to access tomcat1. If tomcat2 uses port 80, only port 80 can be omitted.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326621054&siteId=291194637