JBOSS7 Virtual host configuration and input domain name direct access to the project (configure multiple two-level domain names)

Source: Internet
Author: User
Tags jboss

1.
Modified in Standalone.xml:

Enable-welcome-root= "true" to False

<socket-binding name= "http" port= "/>"


2.
In the first project, add Jboss-web.xml (and Web. XML a directory).

<?xml version= ' 1.0 ' encoding= ' UTF-8 '?>
<jboss-web>
<context-root>/</context-root>
<virtual-host>YouthFortyA</virtual-host>
</jboss-web>

The second one:
<?xml version= ' 1.0 ' encoding= ' UTF-8 '?>
<jboss-web>
<context-root>/</context-root>
<virtual-host>YouthFortyB</virtual-host>
</jboss-web>

In turn ...

3.
Add the following to the subsystem tag that contains virtual-server in the Standalone.xml file:

<virtual-server name= "Youthfortya" default-web-module= "x" >
<alias name= "x.youthforty.com"/>
</virtual-server>
<virtual-server name= "Youthfortyb" default-web-module= "x" >
<alias name= "xx.youthforty.com"/>
</virtual-server>

In turn ...

Virtual-server jboss-web.xml virtual-host in Youthfortya corresponding project in Name= "Youthfortya".
default-web-module= x in "X" is X.war, which is the project program name, JBoss will map to the corresponding project by this name.
The xx.youthforty.com in alias Name= "Xx.youthforty.com" is the project URL.

JBOSS7 Virtual host configuration and input domain name direct access to the project (configure multiple two-level domain names)

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.