RHEL6.0에 https 접속이 가능하도록 apache2.4 설치하고자 하는데요.
설치 후에 https 접속이 되지 않습니다. netstat로 보면 443 포트가 열려있지 않고요.
설치과정은 다음과 같이 했습니다.
1. openssl 1.0.1i 설치
# ./config --prefix=/usr -fPIC
# make
# make install
2. apr-1.5.1 설치
# ./configure --prefix=/usr/local
# make
# make install
3. apr-util-1.5.3 설치
# ./configure --prefix=/usr/local --with-apr=/usr/local
# make
# make install
4. pcre-8.35 설치
# ./configure --prefix=/usr/local
# make
# make install
5. apache (httpd-2.4.10) 설치
# ./configure --prefix=/usr/local/apache2 --with-expat=builtin
--enable-mods-static=all --enable-ssl --with-ssl=/usr --enable-module=ssl
--enable-module=so --enable-module=rewrite --enable-module=headers
--with-apr=/usr/local --with-apr-util=/usr/local --with-pcre=/usr/local
# make
# make install
6. 키 생성
# cd /usr/local/apache2/conf
# openssl genrsa -out server.key 1024
# openssl req -new -key server.key -out server.csr
# openssl req -x509 -key server.key -in server.csr > server.crt
httpd.conf에서 listen 포트 잡아주고, extra/httpd-ssl.conf는 따로 건드리지 않았고요. httpd 데몬을 실행시킨 후 https 접속을 하면 접속이 되지 않습니다. 이더리얼 상에서는 웹서버가 RST 패킷을 내보내 접속을 허용하지 않고 있고요, netstat로 보면 443 포트가 listen 상태가 아니네요. (extra/httpd-ssl.conf에는 443 포트가 정의되어 있습니다.)
따로 아파치 모듈을 컴파일하지 않았고 httpd.conf에 LoadModule 설정을 안해줬는데... 그게 문제일까요?
이전에 사용하던 서버는 RHEL5와 apache2.2가 동작하고 있었는데요, 그 서버에는 /usr/local/apache2/modules 디렉토리에 보면 mod_xxx.so 형태의 파일이 잔뜩있고 httpd.conf에서 LoadModule directive로 로딩하도록 되어 있었는데... 현재 새로 구축한 서버에는 mod_xxx.so 파일들과 LoadModule directive가 안보입니다.
이전의 서버를 제가 구축한 게 아니라, 어떤 방법을 써봐야 할 지, 모듈들을 컴파일 해야 하는 건지, 모듈들을 컴파일해서 로드시킬려면 어떻게 해야 하는 건지 모르겠습니다. 고수분의 한 수 부탁 드립니다.
자문자답을 또 하게 되네요.
설치에는 문제가 없어 보입니다.
httpd.conf에 주석처리되어 있는 부분 중에 extra/httpd-ssl.conf를 Include 하는 것을 주석해제하고 httpd를 재시작했습니다. extra/httpd-ssl.conf 내의 SSLMutex에서 구문에러가 발생하여 그 라인을 주석처리하고 다시 httpd를 구동하였더니 잘 붙습니다. ^^;
댓글 달기