glassfish主机名映射 [英] glassfish hostname mapping
问题描述
按照这里并将您的网络应用分配给他们。
例子:
在< http-service>
元素:
< virtual-server id =foo.domain.comhosts =foo.domain .comnetwork-listeners =http-listener-1/>
然后编辑中的http-listener-1设置< network- config>
元素。更改端口号,如果侦听器应该侦听不同的端口:
< protocol name =http-listener-1 >
< http default-virtual-server =foo.domain.commax-connections =250server-name =foo.domain.com:8080>
...
< / protocol>
最后,将虚拟服务器设置为您的Web应用程序的默认值(位于< ;服务器>
元素。将app-name替换为您的webapp的名称:
< application -ref ref =app-namevirtual-servers =foo.domain.com/>
with glassfish, i'd like to map say foo.domain.com to one context, and bar.domain.com to another context. is there a purely config way to accomplish this?
Configure virtual servers as described here and assign your web-apps to them.
Example:
Add the following in the domain.xml inside the <http-service>
element:
<virtual-server id="foo.domain.com" hosts="foo.domain.com" network-listeners="http-listener-1" />
Then edit the http-listener-1 setting in the <network-config>
element. Change the port number, if the listener should listen to a different port:
<protocol name="http-listener-1">
<http default-virtual-server="foo.domain.com" max-connections="250" server-name="foo.domain.com:8080">
...
</protocol>
Finally set the virtual server as default for your web application (in the <server>
element. Replace app-name with the name of your webapp:
<application-ref ref="app-name" virtual-servers="foo.domain.com" />
这篇关于glassfish主机名映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!