xampp 다운로드
설치매뉴얼은 위의 페이지에서 참고하길 바란다.
xampp 설치시 함께 설치되는 옵션은 다음과 같다.
Apache 2.2.8
MySQL 5.0.51a
PHP 5.2.5 + PHP 4.4.8 + PEAR
PHP-Switch win32 1.0 (please use the "php-switch.bat")
XAMPP Control Version 2.5 from www.nat32.com
XAMPP Security 1.0
SQLite 2.8.15
OpenSSL 0.9.8g
phpMyAdmin 2.11.4
ADOdb 4.96
Mercury Mail Transport System v4.52
FileZilla FTP Server 0.9.25
Webalizer 2.01-10
Zend Optimizer 3.3.0a
eAccelerator 0.9.5.2 for PHP 5.2.5 (comment out in the php.ini)
* System Requirements:
+ 64 MB RAM (RECOMMENDED)
+ 200 MB free fixed disk
+ Windows 98, ME
+ Windows NT, 2000, XP (RECOMMENDED)
일단 설치는 'Next'만 반복하면 된다.
현재 나의 목표는
Apache + php + jsp이다.
위의 설치옵션에서 Tomcat5.5.20을 소스 카피형식으로 설정함
윈도우 환경변수에
CATALINA_HOME 추가
Path에 %CATALINA_HOME%\bin 추가
뭐 이정도 ^^
다음은 mod_jk.so 파일이 필요하다.
다음의 주소에서 다운로드 받길 바란다.
http://mirror.apache-kr.org/tomcat/tomc ··· .2.26%2F
여기에서 "mod_jk-1.2.26-httpd-2.2.4.so"를 다운로드 해서 mod_jk.so 파일로 이름을 변경한다.
다음 이 파일을 apache 디렉토리 아래의 modules 디렉토리에 복사한다.
그리고 conf\아래에 jk라는 폴더를 만들고 거기에 두개의 파일을 생성한다.
1. mod_jk.conf
2. workers.properties
다음은 문제의 아파치 설정이다.
1.3 부터 쭉 봐왔지만 httpd.conf 파일이 버전이 올라가면서 수시로 바뀐다.
일단 아파치를 설정하기 위해서는 xampp\apache로 이동한다.
여기가 아파치가 설치된 디렉토리이다.
conf디렉토리에서 httpd.conf 파일을 열어서 제일 아래에 mod_jk.conf를 incude하는 부분을 추가한다.
# include jk config file
include conf/jk/mod_jk.conf
그리고 저장~~~
mod_jk.conf 파일은 다음과 같이 생성한다.
#========================================
# Load mod_jk module
# Update this path to match your modules location
LoadModule jk_module modules/mod_jk.so
# Declare the module for (remove this line on Apache 2.x)
# AddModule mod_jk.c
# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
JkWorkersFile conf/jk/workers.properties
# Where to put jk shared memory
# Update this path to match your local state directory or logs directory
JkShmFile D:/APP/Tomcat5520/temp/jk2.shm
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
JkLogFile D:/APP/LOGS/mod_jk/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# Send everything for context /examples to worker named worker1 (ajp13)
#JkMount /jsp-examples/* worker1
# JkMount /*.jsp worker1
# JkMount /jjxweb/* worker1
# JkOptions +ForwardURIEscaped
#================================================
workers.properties 파일은 다음과 같이 생성한다.
# workers.properties
#=====================================
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
#========================================
여기까지는 그럭저럭 잘 넘어 왔다.
php는 태터툴즈를 설치해서 테스트 했는데 문제가 없이 잘 되었다.
하지만 java를 연동하니 jk가 동작하지 않는다.
아마도 virtualhost 셋팅 문제인 것 같다.
그래서 찾다보니 다음의 매뉴얼을 발견함
http://tomcat.apache.org/connectors-doc ··· che.html
여기에 설정하는 방법이 자세하게 나와 있다.
이 중에서 내가 선택한 방법은 아래의 부분이다.
conf/jk/mod_jk.conf에서 JkMount를 이용해서 java와의 연동부분을 설정하지 않고
실제 java가 동작하는 VirtualHost 정의부분에 설정해 주니 아주 잘 된다.
============================================================================
You could use no-jk env var to fix problem with mod_alias or mod_userdir directive when jk and alias/userdir URLs matches.
# All URL goes to tomcat except the one containing /home <VirtualHost *:80> ServerName testxxx.mysys DocumentRoot /www/testxxx/htdocs # Use SetEnvIf to st no-jk when /home/ is encountered SetEnvIf Request_URI "/home/*" no-jk # Now /home will goes to /home/dataxxx/ Alias /home /home/dataxxx/ <Directory "/home/dataxxx"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> # Static files in all Tomcat webapp context directories are served by apache JkAutoAlias D:/APP/wwwroot/java # All requests go to worker1 by default JkMount /* worker1 # Serve html, jpg and gif using httpd JkUnMount /*.html worker1 JkUnMount /*.htm worker1 JkUnMount /*.jpg worker1 JkUnMount /*.gif worker1
JkUnMount /*.png worker1
JkUnMount /*.css worker1
JkUnMount /*.js worker1
</VirtualHost>
Use the mod_jk JkAutoAlias directive to map all web application context directories into Apache's document space.
Attempts to access the WEB-INF or META-INF directories within a web application context or a Web Archive *.war within the Tomcat Host appBase (webapps) directory will fail with an HTTP 403, Access Forbidden
위와 같이 설정하는 java가 돌아가는 폴더 하위의 WEB-INF 폴더의 내용은 웹브라우저를 통해서 조회가 되지 않는다.
아 삽질이 힘들구나...
::: 사람과 사람의 교감! 人터넷의 첫 시작! 댓글을 달아주세요! :::