簡體   English   中英

通過虛擬主機在JBoss GateIn 3.6 Portal上的域名映射

[英]Domain name mapping on JBoss GateIn 3.6 Portals through Virtual Host

我已經在GateIn 3.6中創建了一個門戶並部署在服務器上,並且在域名末尾附加了portal / boxmanagement來訪問該門戶,例如http://www.example.com:8080/portal/boxmanagement 其實我想在同一台服務器上創建多個門戶

http://www.example.com:8080/portal/portal1

http://www.example.com:8080/portal/portal2

我想將它們映射為

http://www.portal1.com指向http://www.example.com:8080/portal/portal1

http://www.portal2.com指向http://www.example.com:8080/portal/portal2

誰能指導我如何使用JBoss 7.1在GateIn 3.6中實現此功能? 預先感謝您在這方面的合作。

我建議您使用諸如Apache之類的前端Web服務器,在其上添加上述配置,該配置會將所有查詢重定向到所需的域名。 當然,您必須用正確的域名替換serverName和serverAlias

請嘗試以上配置

<VirtualHost *:80> 
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName www.portal1.com
  ServerAlias portal1.com
  ProxyPass / http://localhost:8080/portal/portal1/
  ProxyPassReverse / http://localhost:8080/portal/portal1/
</VirtualHost> 

<VirtualHost *:80> 
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName www.portal2.com
  ServerAlias portal2.com
  ProxyPass / http://localhost:8080/portal/portal2/
  ProxyPassReverse / http://localhost:8080/portal/portal2/
</VirtualHost> 

請注意,您需要在ProxyPass和ProxyPassReverse的URI末尾保留斜杠“ /”

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM