2023. 4. 24. 12:45
Tomcat 10 /Windows 2019 SSL 적용 server.xml / Redirect
2023. 4. 24. 12:45 in Windows Server
글 쓰는것 따위 필요없고 결론만
2016 이상부터는 아래처럼 써주는것이 좋다.
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="200" SSLEnabled="true" scheme="https" secure="true">
<SSLHostConfig protocols="TLSv1.2" Ciphers="TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA">
<Certificate
certificateKeystoreFile="C:\SSL\filename.pfx"
certificateKeystorePassword="mypassword"
/>
</SSLHostConfig>
</Connector>
- 링크 원본
server.xml 수정.
<!-- http를 https로 리다이렉트 -->
<Connector URIEncoding="UTF-8" port="80" acceptCount="100" enableLookups="false" maxThreads="150" redirectPort="443" />
web.xml 파일에 아래 태그를 추가한다.
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Context</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>