Use Tomcat to deploy Domain name Web site __java-package, deploy

Source: Internet
Author: User
Tags buy domain buy domain name

A tomcat process can deploy multiple domain names OH. 1. Buy domain name, set resolution recommend to Aliyun purchase.


Figure 1-1 Domain name resolution

The effect of this parsing is, access to ' yichudu.com ', the browser address bar will automatically become ' www.yichudu.com '. Baidu, QQ is so dry. 2. Configure a virtual host a domain name corresponds to a virtual host. In $tomcat_home/conf/server.xml, add <Host> tags under the <Engine> label.

Restart Tomcat.

3. Configure the virtual directoryConfigure a virtual directory with an empty path name, see Chapter 2. The virtual directory can be under appbase/or not under appbase/. 4. Configure the Web project's default page

Configure the default page, in the Address bar display ' www.yichudu.com ' situation can show specific pages, the simplicity of the URL appears to force the grid high.

<web-app>  
	<!--...-->
	<welcome-file-list>
		<!--must can ' t start with '/'-->
	   <welcome-file>springmvc/pages/index</welcome-file>
	</welcome-file-list>
</web-app >
Figure 4-1 shows the effect

5. Configure Manager for Host

Move $TOMCAT _home/manager folder under each host and set it up in Conf/tomcat-users.xml.

You can manage applications by typing http://domainName/manager/html in the address bar.

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.