[web] tomcat jsp 접근 제한 설정

아파치에서 막을 수도 있겠지만 **/*.jsp  pattern 으로 접근하는 것을 tomcat 내부적으로 제한 할 수 있다.

http://java.dzone.com/articles/understanding-web-security

<security-constraint>
   <web-resource-collection>
     <web-resource-name>All Access</web-resource-name>
     <url-pattern>/unchecked/*</url-pattern>
     <http-method>DELETE</http-method>
     <http-method>PUT</http-method>
     <http-method>HEAD</http-method>
     <http-method>OPTIONS</http-method>
     <http-method>TRACE</http-method>
     <http-method>GET</http-method>
     <http-method>POST</http-method>
   </web-resource-collection>
   <user-data-constraint>
     <transport-guarantee>NONE</transport-guarantee>
   </user-data-constraint>
</security-constraint>

[web] tomcat 8 context configuration (설정방법)

http://seeit.kr/24
-> 이것을 참고로 함 ㅋ. 내가 일을 잘못 배웠네 ㅋ

http://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Parallel_deployment

톰켓 하나에 여러개의 어플리케이션을 배포할 수 있는데 server.xml은 건드리지 말고 작업하는 것을 추천한다.
server.xml을 수정하면 서버 재시작을 해야 하기 때문이다.

HostName : test.domain.com
Context xml file directory location : $CATALINA_HOME/conf/Catalina/test.domain.com/ROOT.xml
Path : /jenkins

context xml file config(ROOT.xml) :

<?xml version="1.0" encoding="utf-8">
<Context path="/jenkins" docBase="/home/user/war/jenkins/jenkins.war" debug="0" privileged="true"/>

URL : http://test.domain.com:8080/jenkins