Tomcat Domain name Mapping and port settings (EXT)

Source: Internet
Author: User

(1) Tomcat port changed from 8080 to 80

d:/myserver/tomcat/apache-tomcat-6.0.20/conf Find Server.xml file, change port 8080 to 80.

(2) Backstage:

C:/windows/system32/drivers/etc find the file Hosts file,

Open, add:

For example

127.0.0.1 www.kakatao.com

127.0.0.1 kakatao.com

127.0.0.1 localhost

Remember: The Hosts file only controls domain name mapping, regardless of port. The above is to map the domain name. Only Tomcat, GlassFish, etc. server control export use 80

It's 81 or 8080. For example, TOMCAT1 uses 8080 ports and starts, and the Hosts file maps 127 = kakatao.com, so you can access kakatao.com:8080 with 127.0.0.1:8080 and TOMCAT1. If the TOMCAT2 uses 80 ports, only 80 ports can be omitted.

Note: It is often said that http://127.0.0.1 is equivalent to: HTTP://127.0.0.1:80 uses 80 ports. Because only 80 ports can be omitted.

For example: www.sohu.com:80 equivalent to http://www.sohu.com/

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.