반응형
[Ubuntu & Linux] Tomcat9 SSL 적용 후 https로 리다이렉트 설정하는 방법 !! (https redirect)
/usr/share/tomcat9/etc/server.xml 접속 및 설정
# server.xml
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443" />
<Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="{keystoreFile}" keystorePass="{keystorePass}" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="443" />
web.xml 접속 후 맨 아래에 복붙 후 톰캣 재실행 하시면 끝!
<security-constraint>
<web-resource-collection>
<web-resource-name>SSL Forward</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
728x90
반응형
댓글