17.7. 기본 welcome 웹 애플리케이션 구성
JBoss EAP에는 기본적으로 포트 8080의 루트 컨텍스트에 표시되는 기본 welcome
애플리케이션이 포함되어 있습니다.
welcome 콘텐츠를 제공하는 Cryostat에는 기본 서버가 사전 구성되어 있습니다.
기본 Cryostat Cryostat 구성
<subsystem xmlns="urn:jboss:domain:undertow:3.1"> ... <server name="default-server"> <http-listener name="default" socket-binding="http" redirect-socket="https"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <filter-ref name="server-header"/> <filter-ref name="x-powered-by-header"/> </host> </server> ... <handlers> <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/> </handlers> ... </subsystem>
<subsystem xmlns="urn:jboss:domain:undertow:3.1">
...
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
</server>
...
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>
...
</subsystem>
기본 서버(default-server
)에는 기본 호스트(default-host
)가 구성되어 있습니다. 기본 호스트는 welcome-content
파일 처리기와 함께 < location
> 요소를 사용하여 서버의 루트에 대한 요청을 처리하도록 구성되어 있습니다. welcome-content
핸들러는 경로
속성에 지정된 위치의 콘텐츠를 제공합니다.
이 기본 welcome
애플리케이션은 자체 웹 애플리케이션으로 교체할 수 있습니다. 다음 두 가지 방법 중 하나로 구성할 수 있습니다.
시작 콘텐츠를 비활성화할 수도 있습니다.
welcome-content 파일 핸들러 변경
새 배포를 가리키도록 기존 welcome-content
파일 핸들러의 경로를 수정합니다.
/subsystem=undertow/configuration=handler/file=welcome-content:write-attribute(name=path,value="/path/to/content")
/subsystem=undertow/configuration=handler/file=welcome-content:write-attribute(name=path,value="/path/to/content")
또는 서버의 루트에서 사용할 다른 파일 핸들러를 생성할 수 있습니다.
/subsystem=undertow/configuration=handler/file=NEW_FILE_HANDLER:add(path="/path/to/content") /subsystem=undertow/server=default-server/host=default-host/location=\/:write-attribute(name=handler,value=NEW_FILE_HANDLER)
/subsystem=undertow/configuration=handler/file=NEW_FILE_HANDLER:add(path="/path/to/content")
/subsystem=undertow/server=default-server/host=default-host/location=\/:write-attribute(name=handler,value=NEW_FILE_HANDLER)
변경 사항을 적용하려면 서버를 다시 로드합니다.
reload
reload
default-web-module 변경
배포된 웹 애플리케이션을 서버의 루트에 매핑합니다.
/subsystem=undertow/server=default-server/host=default-host:write-attribute(name=default-web-module,value=hello.war)
/subsystem=undertow/server=default-server/host=default-host:write-attribute(name=default-web-module,value=hello.war)
변경 사항을 적용하려면 서버를 다시 로드합니다.
reload
reload
기본 welcome 웹 애플리케이션 비활성화
default-host
의 위치
항목(/
)을 제거하여 시작 애플리케이션을 비활성화합니다.
/subsystem=undertow/server=default-server/host=default-host/location=\/:remove
/subsystem=undertow/server=default-server/host=default-host/location=\/:remove
변경 사항을 적용하려면 서버를 다시 로드합니다.
reload
reload