<Context sessionCookieDomain=".example.com"> ... </Context>
CATALINA_HOMECATALINA_BASECATALINA_OUT : 기본 $CATALINA_BASE/logs/catalina.outCATALINA_OPTS : 톰캣 실행시 JVM 옵션CATALINA_TMPDIR : java.io.tmpdir값 변경. 기본 $CATALINA_BASE/tempJAVA_OPTSCATALINA_PID : *nix에서 프로세스 강제 종료시 사용할 PID 값을 저장하는 파일 지정 -force 옵션 사용시 필수run : 현재 창에서 톰캣 실행start : 새 창(혹은 백그라운드)에서 톰캣 실행stop n -force : 톰캣을 종료하고 n초 기다렸다가 프로세스가 살아있으면 $CATALINA_PID 정보 기준으로 프로세스 KILLImportant: Directory traversal CVE-2007-0450
Tomcat permits '\', '%2F' and '%5C' as path delimiters. When Tomcat is used behind a proxy (including, but not limited to, Apache HTTP server with mod_proxy and mod_jk)
configured to only proxy some contexts, a HTTP request containing strings like "/\../" may allow attackers to work around the context restriction of the proxy,
and access the non-proxied contexts.
The following Java system properties have been added to Tomcat to provide additional control of the handling of path delimiters in URLs (both options default to false):
org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH: true|false
org.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH: true|false
Due to the impossibility to guarantee that all URLs are handled by Tomcat as they are in proxy servers,
Tomcat should always be secured as if no proxy restricting context access was used.
server.xml Connector에 URIEncodign=“UTF-8” 지정org.springframework.web.filter.CharacterEncodingFilter로 필터 적용EOFException과 Memory Leak 일 발생한다.SEVERE: Unable to process Jar entry [com/ctc/wstx/api/ReaderConfig.class] from Jar [jar:jndi:/localhost/ssms-gui/WEB-INF/lib/woodstox-core-asl-4.1.2.jar!/] for annotations java.io.EOFException
HttpServletRequest.remoteAddr로 남겨주는 valueserver.xml <Valve className="org.apache.catalina.valves.RemoteIpValve"
remoteIpHeader="X-Forwarded-For"
requestAttributesEnabled="true"
internalProxies="127\.0\.0\.1" />
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;
RemoteIpValue가 자동 활성화된다.server.tomcat.remote_ip_header=x-forwarded-for
server.tomcat.protocol_header=x-forwarded-proto