티스토리 뷰
What is virtual-server and alias in web subsystem in jboss?(Eng)
트래이닝맨 2014. 9. 2. 13:16Normally, you don't care about these terms as if there are not these attributions in web subsystem because it is only for special case. This blog will talk about the case when these are needed.
"virtual-server".... it sounds like you heard it from some places. Yes, you heard "VirtualHost" a lot from apache side because it is kind of default configuration. By the way, these 2 terms are very similar so I will compare those one.
The term Virtual Host refers to the practice of running more than one web site(such as company1.example.com and company2.example.com) on a single machine. (From http://httpd.apache.org/docs/current/en/vhosts/index.html)
This means that multiple host name can share same port via several ways.
According to same context, virtual-server is for sharing same context-root. By default, it is not possible to deploy multiple applications that have same context-root on an application server. However, sometimes you want to do this case because adding an application server just for deploying same context-root application is big cost. Hence, JBoss server provide "virtual-server" option to solve this problem.
This is sample to deploy applications that use "/"(root-context) on an JBoss instance.
Test Flow :
Browser | Real Location |
ts1.webserver1.org/index.jsp | App1/index.jsp |
ts1.webserver2.org/index.jsp | App2/index.jsp |
Configuration * App1.war(jboss-web.xml)
<jboss-web> |
*App2.war(jboss-web.xml)
<jboss-web>
<context-root>/</context-root>
<virtual-host>webserver2</virtual-host>
</jboss-web>
*standalone.xml
...
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="webserver1" instance-id="ts4" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>
<virtual-server name="webserver1" enable-welcome-root="false" default-web-module="App1.war">
<alias name="localhost"/>
<alias name="ts1.webserver1.org"/>
</virtual-server>
<virtual-server name="webserver2" enable-welcome-root="false" default-web-module="App2.war">
<alias name="localhost"/>
<alias name="ts1.webserver2.org"/>
</virtual-server>
</subsystem>
...
For your information)
As I mentioned before, it is very similar to VirtualHost in Apache thus, I show you sample of "Virtual Host".
<VirtualHost *:80>
ServerName ts1.webserver1.org
DocumentRoot /home/jooho/Applications/EWS/jboss-ews-2.0/docs/test1
</VirtualHost>
<VirtualHost *:80>
ServerName ts1.webserver2.org
DocumentRoot /home/jooho/Applications/EWS/jboss-ews-2.0/docs/test2
</VirtualHost>
'이제 관심밖의 IT 기술 > JBoss' 카테고리의 다른 글
[JGroups] What is Gossip Router? (0) | 2014.09.15 |
---|---|
What is virtual-server and alias in web subsystem in jboss? (2) | 2014.09.02 |
[Review] Wildfly Performance Tuning (0) | 2014.07.28 |
jmx-console in JBoss 7?? (0) | 2014.03.14 |
Custom Module 을 사용하기 (0) | 2014.03.14 |
- Total
- Today
- Yesterday
- ansible
- docker
- Jay
- 토론토
- 밀튼
- 부모님초청이민
- Certificate
- certification
- redhat
- cert
- Red Hat
- 미시사가
- RHCE
- TORONTO
- Canada
- BTBS
- 정착서비스
- 캐나다
- 캐나다부동산
- 우드워킹
- RHEL
- git proGit
- 벌링턴
- 인터넷
- 부동산분석
- 온타리오
- 토론토정착서비스
- 옥빌
- basement
- BC주
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |