2009. 5. 17. 23:59 IT/서버설정
데비안 mod_url 추가
일부 홈페이지에서 한글명으로 된 파일이 업로드되지 않는 문제를 해결하기 위해서는 어쩔 수 없이 아파치에 mod_url 을 올려야 한다. 데비안에서는 이 과정이 아주 간단하다. 문제는 잘 알려지지 않았기 때문에 어려운 것이다.
이 모듈의 최신버전은 KLDP에서 내려받을 수 있다.
홈페이지: http://kldp.net/projects/modurl/
자신이 사용하고 있는 아파치 웹서버의 메이저 버전에 맞는 mod_url 을 받아야 한다. 이 글을 쓰는 현재 apache1 용은 1.16 이고 apache2 용은 1.15 까지 있다.
대부분은 apache2 를 쓸 것이라 생각하고, 기준으로 삼겠다.
debian:/home/test# tar -xvzf mod_url-apache2-1.15.tar.bz2
debian:/home/test# ls
mod_url.c
debian:/home/test# apxs2 -i -c mod_url.c
/usr/share/apr-1.0/build/libtool --silent --mode=compile --tag=disable-static i486-linux-gnu-gcc -prefer-pic -DLINUX=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/postgresql -I/usr/include/xmltok -pthread -I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include/postgresql -c -o mod_url.lo mod_url.c && touch mod_url.slo
/usr/share/apr-1.0/build/libtool --silent --mode=link --tag=disable-static i486-linux-gnu-gcc -o mod_url.la -rpath /usr/lib/apache2/modules -module -avoid-version mod_url.lo
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' mod_url.la /usr/lib/apache2/modules
/usr/share/apr-1.0/build/libtool --mode=install cp mod_url.la /usr/lib/apache2/modules/
cp .libs/mod_url.so /usr/lib/apache2/modules/mod_url.so
cp .libs/mod_url.lai /usr/lib/apache2/modules/mod_url.la
PATH="$PATH:/sbin" ldconfig -n /usr/lib/apache2/modules
----------------------------------------------------------------------
Libraries have been installed in:
/usr/lib/apache2/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system d0cumentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 644 /usr/lib/apache2/modules/mod_url.so
debian:/etc/apache2# vi apache2.conf <==설정파일 편집하여 다음 내용을 삽입한다.
--------------------------------------------------
LoadModule redurl_module /usr/lib/apache2/modules/mod_url.so
<IfModule mod_url.c>
CheckURL On
ServerEncoding EUC-KR
ClientEncoding UTF-8
</IfModule>
---------------------------------------------------
주1) 만약 apxs2 명령어가 없다면 다음 명령어로 패키지를 설치한다.
*** apxs2설치
'IT > 서버설정' 카테고리의 다른 글
데비안서버 보안설정 (0) | 2009.05.18 |
---|---|
아파치 서버 설정(계정 Rewrite) (0) | 2009.05.17 |
데비안 mod_url 추가 (0) | 2009.05.17 |
데비안의 로케일 설정 (0) | 2009.05.17 |
APM환경에서 보안설정(데비안) (0) | 2009.05.17 |
리눅스 iconv 로 캐릭터셋 변환하기 (0) | 2009.05.15 |
댓글을 달아 주세요