You can use the local service to test how TOMCAT configures domain names.

Source: Internet
Author: User

Use your own machine as the server configuration result. The test is successful.
The configuration is as follows:
Modify the file server. xml under \ Tomcat-7.0.29 \ conf in your tomcat installation directory,
Open it in notepad and find:
<Connector
Port = "8080"
To:
<Connector
Port = "80"

Find again:
<Engine
DefaultHost = "localhost"
Name = "Catalina">
<Realm className = "org. apache. catalina. realm. UserDatabaseRealm"/>
<Host
AppBase = "webapps"
Name = "localhost">
To:
<Engine
DefaultHost = ""
Name = "Catalina">
<Realm className = "org. apache. catalina. realm. UserDatabaseRealm"/>
<Host
AppBase = "webapps"
Name = "">
Change the port to 80, and set defaultHost and name to the domain name you applied.
Now, let your friends on the Internet access the JSP server built on your own machine! I have learned many details,
Writing them one by one is too cumbersome!

The IP address is used for LAN access because there is no domain name resolution system or software like oray.
Make a Domain Name Server by yourself!
Of course, the local localhost can be accessed with a domain name. Modify C: \ WINDOWS \ system32 \ drivers \ etc \ hosts

File,
Open him in notepad

To:
Wyptest.com. Remove the comment.

Create a folder corresponding to your domain name under the \ conf \ Catalina directory, for example, ww.wyptest.com. Create a ROOT. xml file under the folder.
Content:
<? Xml version = '1. 0' encoding = 'utf-8'?>
<Context displayName = "Welcome" docBase = "" E:/tomcat-7.0.29/webapps/flexpaper-demo/"path =" ">
</Context>

Access address: http://www.wyptest.com/flexpaper-demo/documentUpload.jsp results run successfully, please note that the domain name has changed.

 

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.