jboss 7.1.1中两个Web应用程序的两个DNS名称
我有问题.我有两个部署为战争的Web应用程序.我们称它们为app1.war和app2.war.
I have a problem. I have two web apps deployed as wars. Let's call them app1.war and app2.war.
我希望可以通过URL www.website.com访问app1.war,并且希望可以通过www.anotherweb.com访问app2.war.我已经准备好域名了.
I would like app1.war to be accessed at the URL www.website.com and I would like app2.war to be accessible as www.anotherweb.com. I have my domain name ready.
我能够以www.website.com/app1、www.website.com/app2的形式运行该应用程序.
I am able to run the application as www.website.com/app1, www.website.com/app2.
所以现在我需要使用www.website.com和www.anotherweb.com
So Now i need to run using www.website.com and www.anotherweb.com
我正在运行JBoss7.1.1.
I am running JBoss7.1.1.
感谢您的见解.
您需要放置 Apache Http服务器在用户和JBoss服务器之间,而不是直接从Web访问您的服务器.将Apache HTTP服务器配置为将 mod_proxy 与
You need to put Apache Http server between user and JBoss server and not access your server directly from web. Configure Apache HTTP server to use mod_proxy with virtual host configuration. If your JBoss server runs on http://localhost:8080
, it will look something like this in httpd.conf
.
NameVirtualHost *:80
<VirtualHost *:80>
RewriteEngine On
ServerName www.website.com
ProxyPass / http://localhost:8080/app1/
ProxyPassReverse / http://localhost:8080/app1/
</VirtualHost>
<VirtualHost *:80>
RewriteEngine On
ServerName www.anotherweb.com
ProxyPass / http://localhost:8080/app2/
ProxyPassReverse / http://localhost:8080/app2/
</VirtualHost>