티스토리 뷰

출처 : http://blog.naver.com/PostView.nhn?blogId=choigohot&logNo=220802318393&parentCategoryNo=&categoryNo=17&viewDate=&isShowPopularPosts=true&from=search

 

Tomcat 웹서버에서 http로 들어온 Request를 https로 Redirect 시키기...

Tomcat 웹서버에서 http로 들어온 Request를 https로 Redirect 시키기... 1. web.xml 설정 <security...< p=""> </security...<>

blog.naver.com

1. web.xml 설정

 

    <security-constraint>
        <web-resource-collection>
                <web-resource-name>Automatic SSL Forward</web-resource-name>
                <url-pattern>/*</url-pattern>
                <http-method>GET</http-method>
                <http-method>POST</http-method>
        </web-resource-collection>
        <user-data-constraint>
              <transport-guarantee>
                      CONFIDENTIAL
              </transport-guarantee>
      </user-data-constraint>
    </security-constraint>

 

2. server.xml 설정/확인할 부분

<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />

 

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="443" server="XXXX"/> //혹은 80 port

   

<Connector port="443" protocol="HTTP/1.1"
               address="xxx.xxx.xxx.xxx"
               maxThreads="150" enableLookups="false"
               acceptCount="200" scheme="https"
               secure="true" SSLEnabled="true"
               keystoreFile="....../ssl/keystore" keystorePass="xxxxxx" 

               clientAuth="false" sslProtocol="TLS" server="XXXXX"/>

 

 <Connector port="8009" protocol="AJP/1.3" redirectPort="443" />

 

이정도 확인 후

tomcat  Restart 하고 http://localhost => https://localhost로 변경되는지 확인 하면 됨..

모든 http 요청에 대해 https로 변경 되어야 함

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함