`
makeithappen
  • 浏览: 9803 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
最近访客 更多访客>>
社区版块
存档分类
最新评论

Using Virtual Hosts in Jboss AS

 
阅读更多

In my previous project, we need configure virtual host in the project in order to get  the best customer experience during user acceptance testing. Users could access the  

application system if users entered the virtual host name in web browser address bar that's what we expected. but it is unrealistic, users need to configure the

mapping in host file manually before accessing the application system; According to my suggestions, at last, the CA of this project decided to use DNS to solve this

problem, and i suppose it should the realistic and the best solution; LOL.

 

But, I still would like to share the virtual host configurations here, because, it is very usefull tools if there have multi-project should comunicate with one another in

same application server or different application server, ok, let's start to configure the virtual host in jboss application server.


1. Please be noticed that this sample is based on Jboss AS version 6.1.0, please check the version of your own jboss application server before proceeding.

2. Create a new file with name jboss-web.xml, it should be placed under directory: <project root>/docroot/WEB-INF/ and it should contains following information,
here, for example, my virtual host name is dev.vsapp.com.cn.
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
  <context-root>/</context-root>
  <virtual-host>dev.vsapp.com.cn</virtual-host>
</jboss-web>

3. Create a new virtual host in server.xml which is under directory \jboss-6.1.0.Final\server\default\deploy\jbossweb.sar, here my project virtual host name is

dev.vsapp.com.cn, as below:
<Host name="dev.vsapp.com.cn" autoDeploy="false" deployOnStartup="false" deployXML="false"

configClass="org.jboss.web.tomcat.security.config.JBossContextConfig">

 <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="dev.vsapp.com.cn-" suffix=".log" pattern="common"

directory="${jboss.server.log.dir}" resolveHosts="false" />

</Host>

 

4. Start your Jboss AS using below command:
command: run.bat -b 0.0.0.0 -c default

4. Access your own application using virutal host name,
http://dev.vsapp.com.cn:8080/

 

5. By default, we don't want have the port 8080 at the end of virtual host name, that's mean the jboss application server is started using port 80 not 8080, if we need to

do so, the value of port for server "jboss.web:service=WebServer" in bindings-jboss-beans.xml which under directory jboss-

6.1.0.Final\server\default\conf\bindingservice.beans\META-INF should be "80".

 

6. After we modified the port for web server "jboss.web:service=WebServer" from 8080 to 80 and restart the Jboss AS, we can access our own application using:
http://dev.vsapp.com.cn/

 

PS:http://docs.jboss.org/jbossas/guides/webguide/r2/en/html/ch9.https.sect.html

分享到:
评论

相关推荐

    JBoss AS7教程

    【JBoss AS7教程】 JBoss Application Server 7(简称JBoss AS7)是Red Hat公司推出的一款开源Java EE应用服务器,它基于EAP(Enterprise Application Platform)的轻量级版本,提供了对Java EE 6规范的全面支持。...

    JBoss AS 5 Development

    ### JBoss AS 5 Development: 关键知识点解析 #### 一、JBoss AS 5 概述 **JBoss AS 5(Application Server 5)**是JBoss组织推出的一款开源应用服务器,它为Java应用程序提供了强大的运行环境。JBoss AS 5在企业...

    JBoss AS 7 Development

    ### JBoss AS 7 Development #### 一、概述 JBoss AS 7(Application Server 7)是一款功能强大且开放源代码的应用服务器,为开发者提供了高效稳定的开发平台,支持多种高级特性,包括EJB(Enterprise JavaBeans)...

    jboss as7 文档

    ### JBoss AS7 文档概览 JBoss AS7(Application Server 7)是JBoss社区推出的一款开源应用服务器,其文档提供了全面且详细的指南、教程及资源介绍,旨在帮助开发者和管理员更好地理解和掌握JBoss AS7的各项功能与...

    JBoss AS 7 简介

    - **讨论论坛**:http://community.jboss.org/community/jbossas/dev/jboss_as7_development?view=all - **下载页面**:http://sourceforge.net/projects/jboss/files/ #### 编译与启动 - **编译流程**: 1. ...

    Jboss AS 5 Development

    The latest JBoss AS 5 Development Guide book, very practical to any developer who is or is going to use JBoss AS

    [JBoss] JBoss AS 7 配置部署管理教程 (英文版)

    [Packt Publishing] JBoss AS 7 配置部署管理教程 (英文版) [Packt Publishing] JBoss AS 7 Configuration, Deployment and Administration (E-Book) ☆ 出版信息:☆ [作者信息] Francesco Marchioni [出版机构...

    jbossAS7开发指南

    **章节标题**: “Classloading in JBoss AS7” **知识点**: 1. **部署模块名称**: 在 JBoss AS7 中,每个部署都对应一个唯一的模块名称,用于标识该部署所包含的类和资源。 2. **自动依赖**: JBoss AS7 支持在部署...

    Nginx 1.2.1 + JBOSS AS 7 负载配置及Session处理

    Nginx 1.2.1 + JBOSS AS 7 负载配置及Session处理 本文主要介绍了如何使用 Nginx 1.2.1 和 JBOSS AS 7 实现负载均衡和 Session 处理。文章首先介绍了使用 Nginx 1.2.1 和 JBOSS AS 7 做为应用服务器的理由,然后...

    [JBoss] JBoss AS 7 开发教程 (英文版)

    [Packt Publishing] JBoss AS 7 开发教程 (英文版) [Packt Publishing] JBoss AS 7 Development (E-Book) ☆ 出版信息:☆ [作者信息] Francesco Marchioni [出版机构] Packt Publishing [出版日期] 2013年06月...

    jboss-as-web.Final-RECOMPILE.jar.rar

    JBoss Application Server(简称JBoss AS)是Red Hat公司开发的一款开源Java应用服务器,它基于Java EE(Enterprise Edition)规范,为企业级应用提供运行环境。JBoss AS 7是其一个重要版本,引入了许多改进和优化,...

    jboss-as-master

    【JBoss AS 概述】 JBoss Application Server(简称JBoss AS)是Red Hat公司开发的一款开源Java EE应用服务器,它基于Eclipse MicroProfile和Jakarta EE标准,为开发和部署企业级应用程序提供了全面的平台。JBoss ...

    jboss as 5 developments

    jboss 5的详细说明。对在jboss5上进行开发来说是很好的参考资料。

    jboss as 7

    JBoss AS 7 是一款开源的应用服务器,由 Red Hat 公司开发,它提供了一个高效且灵活的平台来运行Java应用程序。在这个版本中,JBoss 引入了命令行接口 (CLI) 作为管理和部署应用的主要工具,以提高管理效率和自动化...

    JBoss AS5 安装上手指南

    JBoss Virtual File System (VFS) 是一种虚拟文件系统,用于管理文件和目录。它支持多种文件系统类型,并可以实现热部署等功能。 ##### 1.5.2 Hibernate Logging JBoss AS5 中对 Hibernate 的日志记录进行了优化,...

    图书:JBoss AS 5开发

    《JBoss AS 5开发》是一本专注于JBoss Application Server(AS)5版本的专业图书,旨在帮助开发者深入理解和高效利用这一开源的企业级Java应用服务器。JBoss AS是Red Hat公司的产品,是Java EE(现在称为Jakarta EE...

    jboss-as-7.1.0.Final.zip

    《JBoss AS 7.1.0.Final:企业级应用服务器详解》 JBoss AS,全称为"Java EE Application Server",是Red Hat公司开发的一款开源、免费的应用服务器,它基于Java平台的企业级服务(Java Platform, Enterprise ...

Global site tag (gtag.js) - Google Analytics