메뉴 건너뛰기

1. XE 설치 시, 아파치 rewrite 모듈이 없으면 아래와 같은 에러가 발생합니다.

xe_rewrite오류.PNG

 

2. 아파치 rewrite 모듈 컴파일
전제조건: 기존 아파치 컴파일 시, #./configure --enable-so 옵션이 있었어야 모듈 동적추가 가능함
https://httpd.apache.org/docs/2.0/ko/dso.html


[root@test httpd-2.2.21]# /usr/local/apache/bin/apxs -aic modules/mappers/mod_rewrite.c
/usr/local/apache/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache/include  -I/usr/local/apache/include   -I/usr/local/apache/include   -c -o modules/mappers/mod_rewrite.lo modules/mappers/mod_rewrite.c && touch modules/mappers/mod_rewrite.slo
/usr/local/apache/build/libtool --silent --mode=link gcc -o modules/mappers/mod_rewrite.la  -rpath /usr/local/apache/modules -module -avoid-version    modules/mappers/mod_rewrite.lo
/usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' modules/mappers/mod_rewrite.la /usr/local/apache/modules
/usr/local/apache/build/libtool --mode=install cp modules/mappers/mod_rewrite.la /usr/local/apache/modules/
cp modules/mappers/.libs/mod_rewrite.so /usr/local/apache/modules/mod_rewrite.so
cp modules/mappers/.libs/mod_rewrite.lai /usr/local/apache/modules/mod_rewrite.la
cp modules/mappers/.libs/mod_rewrite.a /usr/local/apache/modules/mod_rewrite.a
chmod 644 /usr/local/apache/modules/mod_rewrite.a
ranlib /usr/local/apache/modules/mod_rewrite.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/apache/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/apache/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 documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/local/apache/modules/mod_rewrite.so
[activating module `rewrite' in /usr/local/apache/conf/httpd.conf]
[root@test httpd-2.2.21]#

3. rewrite 모듈 확인
1) 컴파일하면, /usr/local/apache/modules/mod_rewrite.so 에 모듈이 추가되어 있고,
2) httpd.conf 에 LoadModule 되어 있음
LoadModule ssl_module modules/mod_ssl.so
LoadModule php5_module        modules/libphp5.so
#LoadModule mbstring        modules/mbstring.so
LoadModule rewrite_module     modules/mod_rewrite.so

아파치 재시작 후, phpinfo 에서 rewrite 모듈확인

xe_rewrite확인.PNG

 

번호 제목 글쓴이 날짜 조회 수
34 git, github 사용하기. vscode에서 github 연동하기(2023.02.09) file 관리자 2023.02.08 1298
33 록키리눅스(Rocky Linux) 네트워크 설정하기 - nmcli, nmtui file 관리자 2023.02.01 35627
32 CentOS 종료 대비, 록키 리눅스(Rocky Linux) 설치하기 file 관리자 2023.01.27 1360
31 플래시 설치파일 file 관리자 2021.01.13 356
30 tar 압축하면서 다른 디렉토리에 풀기 file 관리자 2020.11.14 475
29 리눅스 하드디스크 추가 관리자 2019.02.12 1431
28 [MySQL]ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 관리자 2018.12.23 1295
27 [리눅스]phpinfo() 실행 시 하얀 화면이 나타날 경우 대처방법 file 관리자 2018.12.13 3703
26 [리눅스]rsync 설정 후, crontab 스케줄 등록 관리자 2018.08.28 2740
25 [리눅스][XE]백업복구(서버이관) 시 오류-03.사이트 메뉴 편집, 사이트 디자인 설정 출력 안되는 현상 file 관리자 2018.08.27 11124
24 [리눅스][XE]백업복구(서버이관) 시 오류-02.아파치 rewrite에러 file 관리자 2018.08.27 516
23 [리눅스][XE]백업복구(서버이관) 시 오류-01.No matching DirectoryIndex (index.html) fonud 오류 file 관리자 2018.08.27 1461
22 [리눅스][XE][오류]msg_is_not_administrator file 관리자 2018.08.08 1242
21 [리눅스]CentOS에서 하드디스크 추가 관리자 2018.03.21 8843
20 [리눅스]리눅스 파일 압축 암호 설정 및 해제(ZIP) 관리자 2017.07.30 18083
19 [리눅스]CentOS 7,최신 APM 소스설치-5) PHP, gd library jpeg support file 관리자 2017.02.21 1853
18 [리눅스]CentOS 7 root password 분실 file 관리자 2016.12.27 6353
17 [리눅스]vsftpd ftp 파일전송오류(451 Failure writing to local file) 관리자 2016.12.20 4117
16 [리눅스]APM(apache+php+mysql) 다른서버로 이관하기(백업-복구하기) 관리자 2016.09.12 4673
15 [리눅스]XE(XpressEngine)설정 file 관리자 2016.07.26 684