728x90
반응형
17.7. 핸들러 구성 | Configuration Guide | Red Hat JBoss Enterprise Application Platform | 7.4 | Red Hat Documentation
Red Hat JBoss Enterprise Application Platform 형식멀티 페이지단일 페이지모든 문서를 PDF로 표시
docs.redhat.com
jboss에서는 다음 두 가지 핸들러 구성 가능
- 파일 핸들러 : 정적 파일 제공. tomcat의 DocBase 역할
- reverse proxy 핸들러 : 역방향 프록시
기본 Undertow 하위 시스템 구성
<subsystem xmlns="urn:jboss:domain:undertow:10.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other">
<buffer-cache name="default"/>
<server name="default-server">
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
</host>
</server>
<servlet-container name="default">
...
</servlet-container>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>
</subsystem>
파일 핸들러 설정 방법
standalone-ha.xml에 설정
1. location 설정
<location name="${접속uri}" handler="${handler_name}"/>
ex) <location name="/upload" handler="nas"/>
2. 파일 핸들러 정의
/subsystem=undertow/configuration=handler/file=${handler_name}:add(path=${handler_path})
ex) /subsystem=undertow/configuration=handler/file=nas:add(path=/data/nas/upload)
! 디렉터리 대신 파일 핸들러의 경로를 직접 설정하는 경우 해당 파일 핸들러를 참조하는 모든 위치 요소가 슬래시(/)로 끝나는 경우 서버에서 404 - 찾을 수 없음 응답을 반환함. /로 끝나지 않도록 주의

=> testserver.co.kr/upload 로 접근하는 경우 서버에서는 testserver.co.kr/data/nas/upload 경로에서 파일을 가져옴
3. 서버 재기동
728x90
반응형
'WAS > JBOSS_WILDFLY' 카테고리의 다른 글
| [ERROR] ISPN000136 / WFLYCLWEBINF0004 / ISPN000299 15초 간격으로 반복되는 infinispan error (0) | 2025.12.26 |
|---|---|
| 27. Access log 설정 (0) | 2025.11.24 |
| 26. jboss-cli.sh connection (0) | 2025.11.03 |
| 25. jboss-deployment-structure.xml (0) | 2025.10.21 |
| 24. instance id 설정하기 (0) | 2025.09.15 |