Apache Upgrade(2.2 -> 2.4)

아파치 2.2에서 2.4로 업그레이드 되면서 일부 설정 파일의 변화가 있었습니다. 내용을 간략히 정리해 보았습니다.

기존 2.2 설정을 유지한 상태로 서비스를 기동하게 되면 서비스 기동이 실패할 확률이 높으므로 설정 파일에 대한 검토가 선행 되어야 합니다.

주요 설정 차이는 아래와 같습니다.

Version2.2
PolicyOrder allow,denyAllow from all
VhostsNameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot “D:\webapp\testlocalhost”
    ServerName testlocalhost
    ServerAlias testlocalhost
    ErrorLog “logs/testlocalhost -error.log”
    CustomLog “logs/testlocalhost -access.log” common
</VirtualHost>
cgid_modulesLoadModule cgid_module modules/mod_cgid.so
on httpd.conf
Version2.4
PolicyRequire all granted
Vhosts<VirtualHost testlocalhost:80>
    DocumentRoot “D:\webapp\testlocalhost”
    ServerName testlocalhost
    ErrorLog “logs/testlocalhost -error.log”
    CustomLog “logs/testlocalhost -access.log” common
</VirtualHost>
cgid_modules주석처리
on httpd.conf
refer(예시)
DocumentRoot /some/local/dir

<Directory /some/local/dir/>
   <RequireAll>
      Require all granted
      Include conf/IPList.conf
   </RequireAll>
</Directory>

#this will also work
<Location />
   <RequireAll>
      Require all granted
      Include conf/IPList.conf
   </RequireAll>
</Directory>
And inside conf/IPList.conf, you will have individual lines with entries like the following
conf/IPList.conf에 아래와 같이 개별 접근 제어할 IP 리스트를 파일로 보관할 수 있으며 2.2의 Allow 대신 Require를 사용하게 되었습니다.

Require not ip 10.10.1.23
Require not ip 192.168.22.199
Require not ip 10.20.70.100

그 외의 기능은 아래 출처를 통해 추가로 확인할 수 있습니다.

출처> http://httpd.apache.org/docs/trunk/upgrading.html

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 Akismet을 사용하여 스팸을 줄입니다. 댓글 데이터가 어떻게 처리되는지 알아보세요.