원래 jk2.properties 파일이 톰켓 conf 디렉토리에 있어야 하지만 톰켓 5.5 에서 jk2 가 deprecated  되었기때문에 없다. 개발자들의 흥미가 떨어져서 중단됬다고 한다..ㅡ.ㅡ;

그러나 걱정하지 말자 server.xml 파일에 기존의 jk 커넥터가 기본으로 설정되어 있으니 그냥 사용하면 된다. (똑같은 jk 이기때문에 호환 되는거 같다.)

그리고 아파치로 서비스 하게되면 8080 번 포트의 기본 커넥터가 필요없어지니 server.xml 파일에서 주석 걸어두는게 좋을 것이다.



이 문서는 apache2 와 tomcat5.5 가 설치되어있다고 가정한다.



1. UBUNTU 에 JK2 설치하기


$ sudo apt-get install libapache2-mod-jk2



2. jk2.conf, jk2.load 파일 apache2 conf 파일에서 Include 하기

- apache2 conf 파일을 열어보면 아래와같은 부분을 볼수있다.


Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf


- /etc/apache2/mods-enabled 디렉토리에 load 나 conf 파일을 넣어준다면 자동 Include 된다는 소리다.

- /etc/apache2/mods-available 디렉토리에 있는 jk2.conf,jk2.load 파일을 mods-enabled 로 링크 해주자.


3. jk2.conf 파일을 열어보면 아래와같이 또 인클루드 하는데 해당 파일이 없을테니 만들어주자


JkSet config.file /etc/apache2/workers2.properties



4. /etc/apache2/workers2.properties 파일


# Define the communication channel
[status:]
[uri:/jkstatus/*]
group=status:
[shm:]disabled=1
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009


# Web Applicaton
[uri:/jsp-examples/*]
info=Map the whole webapp



5. 톰켓 & apache2 재시작


6. http://localhost/jsp-examples/ 들어가봤을때 제대로 나오면 성공이다.

by cranix 2006. 12. 16. 20:17
| 1 |