---
title: "关于JBOSS的HOST配置问题"
author: "away888"
date: "2011-08-23T12:30:34Z"
tags: ["JBOSS 配置 HOST"]
categories: ["编程语言"]
slug: "jboss-host"
draft: false
lastmod: "2011-08-23T12:31:36Z"
id: 1155779
url: "https://away888.iteye.com/blog/1155779"
---

WEB-INF/jboss-web.xml In your web application you’ll want to add an xml file named “jboss-web.xml” to your WEB-INF folder. This is the file that’s going to map both the web application’s context and host in jboss. \[code="java"] / www.first-application.com \[/code] jbossweb.sar/server.xml Now we need to edit jboss’ server.xml file, adding the virtual host mappings: \[CODE="JAVA"] dev.first-application.com qa.first-application.com test.first-application.com dev.second-application.com qa.second-application.com test.second-application.com \[/CODE] 上面是官方的host配置文档。我发现host name必须为www.\*\*.com的形式，不能没有www,要不然，JBOSS识别不了。目前就发现这个问题，不知为什么。配置Tomcat时，并没有这个闻听出现。 还有，当遇到，什么ROOT.WAR已经存在的问题，可以把web.xml中的 / 改成你，当前部署的war名字，就行了。