기본 콘텐츠로 건너뛰기

글

라벨이 tomcat인 게시물 표시

tomcat apr ssl 인증서 오류

톰캣을 다시 설치 하면서 속도 향상을 위해 native 라이브러리 옵션을 설정 했더니 다음 에러가 난다. Connector attribute SSLCertificateFile must be defined when using SSL with APR at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:511) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:750) at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:458) at org.apache.catalina.connector.Connector.initInternal(Connector.java:960) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardService.initInternal(StandardService.java:568) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:869) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) at org.apache.catalina.startup.Catalina.load(Catalina.java:580) at org.apache.catalina.startup.Catalina.load(Catalina.java:603) at sun.reflect.NativeMethodAccessorI...

윈도우 톰캣 버전확인

cmd 창을 연 후 cd C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin version.bat 실행 ======================================================== Using CATALINA_BASE:   "C:\Program Files\Apache Software Foundation\Tomcat 8.0" Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Tomcat 8.0" Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\Tomcat 8.0\temp" Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_91" Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin\tomcat-juli.jar" Server version: Apache Tomcat/8.0.33 Server built:   Mar 18 2016 20:31:49 UTC Server number:  8.0.33.0 OS Name:        Windows Server 2012 R2 OS Version:     6.3 Architecture:   amd64 JVM Version:    1.8.0_91-b14 JVM Vendor:     Oracle Corporation ...

윈도우 톰캣 네트워크 드라이버 잡기

윈도우 톰캣 네트워크 드라이버 설정(windows tomcat network driver setting) TOMCAT_HOME/conf/server.xml 의 Host 노드 아래 경로 추가     <Context path="/resources" docBase="//192.168.200.100/cifs/pds" /> 서버스 재구동 하면 다음 메시지 뜸 SEVERE [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.beforeStart Exception fixing docBase for context [/resources] java.io.IOException: 사용자 이름 또는 암호가 올바르지 않습니다 at java.io.WinNTFileSystem.canonicalize0(Native Method) at java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:428) at java.io.File.getCanonicalPath(File.java:618) at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:593) at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:744) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:300) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)...

tomcat manager remote access

톰캣 설치를 하면 manager 는 로컬 호스트에서만 접속이 가능하다. maven 으로 tomcat manager-text 를 사용 할려면 톰캣의 설정을 바꿔 줘야 접속이 가능하다. 1. 톰캣 유저를 추가 한다. ( conf/tomcat-users.xml ) <?xml version='1.0' encoding='cp949'?> <tomcat-users xmlns="http://tomcat.apache.org/xml"               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"               xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"               version="1.0">     <role rolename="manager-gui"/>     <role rolename="manager-script"/>     <user username="admin" password="admin" roles="manager-script,manager-gui"/> </tomcat-users> 2. manager.xml 생성 (conf/Catalina\localhost\manager.xml) <Context privileged="true" antiResourceLocking="false"          docBase="${catalina.home}/webapps/manager"> <Valve className="org....

tomcat https 설정 및 http to http redirect

보통은 할일이 없는데 이걸 내가 할 줄이야.. I. 서버 인증서 설치 해서 크롬이나 ie에서 보안경고 안보이게. II. 톰캣 : 80  ==> 443 리다이렉트 I. 서버 인증서 설치 해서 크롬이나 ie에서 보안경고 안보이게. 1. 인증서 생성 1.1. 자바 스탠다드 키스토어 포맷으로 생성 ( java standard key store : jks ) 설치될 서버 도메인 확정 test.mydomain.com => 생성할 도메인으로 바꾸시면 됩니다. "%JAVA_HOME% \b in \k eytool" -genkey -alias myssl -keypass 인증서비밀번호 \ -storepass 인증서비밀번호 -keyalg RSA -sigalg SHA1withRSA \ -dname "CN=test.mydomain.com, OU=OrgUnit, O=AssetPlus, C=KR" \ -keystore %USERPROFILE%\test.mydomain.com.jks 이때 CN=test.mydomain.com 정확히 적으셔야 인증이 마무리 됩니다. 1.2. 인증서 요청파일 CSR(Certificate Signing Reuest) 파일 생성 "%JAVA_HOME% \b in \k eytool" -certreq -keyalg RSA -alias myssl \ -sigalg SHA1withRSA -keystore %USERPROFILE%\ test .mydomain.com.jks \ -file %USERPROFILE%\test.mydomain.com.certreq.csr CSR 파일을 열어보면  이렇게 생겨 있습니다.  이제 무료 인증 싸이트 가입 해서 인증을 요청 합니다. 와우사인 업체입니다. https://buy.wosign.com/free/#ssl Request a F...

메이븐 웹 프로젝트 tomcat 배포

메이븐 웹 프로젝트 tomcat 배포 이클립스 톰캣 서버 위치 변경 톰캣 서버 사용자 추가 C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\tomcat-users.xml <?xml version='1.0' encoding='cp949'?> <tomcat-users xmlns="http://tomcat.apache.org/xml"               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"               xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"               version="1.0"> <role rolename="manager-script"/> <user username="admin" password="admin" roles="manager-script"/> </tomcat-users> role 과 사용자를 추가 하였다. maven-war-plugin , tomcat-maven-plugin 추가 및 설정 추가 한 부분은 build node 아래 plugins 노드에 있다. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd...

tomcat hello jar sample in eclipse.

Eclipse ant setting jdk eclipse > Preference > Ant > Runtime > Global Entries add External JARs -> jdk 6.0_45 tools.jar add Project Setting  web.xml <web-app version="2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xsi:schemalocation="http:/java.sun.com/dtd/web-app_2_3.dtd">   <servlet>     <servlet-name>hello</servlet-name>     <servlet-class>test.HelloServlet</servlet-class>   </servlet>   <servlet-mapping>     <servlet-name>hello</servlet-name>     <url-pattern>/hello</url-pattern>   </servlet-mapping> </web-app> build.xml <?xml version="1.0" encoding="UTF-8"?> <project name="myWeb" default="build-jar" basedir="."> <property name="tomcat-home" value="E:/dev/was/apache-tomcat-7.0.54" /...