1. 마이그레이션
1-1. 접근 제어 선언 방식 변경
- 2.2에서 Order, Allow , Deny 등의 지시자로 하던 접근 제어 설정은 Require 를 이용한 방식으로 변경되어야한다.
1) 모든 요청 거부
# 2.2 설정
Order deny,allow
Deny from all
# 2.4 설정
Require all denied
2) 모든 요청 허용
# 2.2 설정
Order allow,deny
Allow from all
# 2.4 설정
Require all granted
3) example.org 허용 나머지 거부
# 2.2 설정
Order Deny,Allow
Deny from all
Allow from example.org
# 2.4 설정
Require all denied
Require host example.org
4) 127.0.0.1 허용 나머지 거부
# 2.2 설정
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
# 2.4 설정
Require all denied
Require ip 127.0.0.1
1-2. 속성/모듈 변경
- 속성/모듈 변경
- Httpd의 기존 설정에서 아래 속성/모듈과 관련된 선언이 있다면, 이름을 바꾸어준다.
- 속성명
- MaxClients -> MaxRequestWorkers
- MaxRequestsPerChild -> MaxConnectionsPerChild
- 모듈명
- mod_disk_cache -> mod_cache_disk
- KeepAlive
- 속성은 On 이나 Off 중 하나의 값을 가질수 있다. 0,1과 같이 숫자로 선언되어 있는 경우가 있었다면 수정해야 한다.
<IfModule mpm_prefork_module>
StartServers 30
MinSpareServers 30
MaxSpareServers 128
ServerLimit 1024
MaxClients 1024 # MaxClients -> MaxRequestWorkers
MaxRequestsPerChild 100000 # MaxRequestsPerChild -> MaxConnectionsPerChild
</IfModule>
...
KeepAlive Off # 속성은 On 이나 Off 중 하나의 값을 가질수 있다.
- 속성 디폴트 값 변경 확인
- 아래 속성들은 디폴트값이 바뀌었다.
- 기존에 암묵적으로 디폴트값에 의존을 했었다면 명시적으로 선언한다.
- Options 내 -,+ 모두 표시
- Either all Options must start with + or -, or no Option may.
- 오류가 발생시 모든 Options 내 +, - 표시를 해주어야 합니다.
<Directory "/home1/irteam/deploy/doc_base">
Options -Indexes FollowSymLinks MultiViews # Options -Indexes +IncludesNoExec +FollowSymLinks +MultiViews
AllowOverride None # 명시적으로 선언
Order allow,deny
Allow from all
FileETag None # 명시적으로 선언
</Directory>
2. 오류로그 및 해결책
오류 1
# 오류 로그
httpd: Syntax error on line 59 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf:
Cannot load modules/mod_authz_default.so into server: /home1/irteam/apps/apache/modules/mod_authz_default.so: cannot open shared object file: No such file or directory
# 해결 방법
mod_authz_default 삭제
오류 2
# 오류 로그
httpd: Syntax error on line 73 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf:
Cannot load modules/mod_ident.so into server: /home1/irteam/apps/apache/modules/mod_ident.so: cannot open shared object file: No such file or directory
# 해결 방법
mod_ident 삭제
오류 3
# 오류 로그
AH00534: httpd: Configuration error: No MPM loaded.
# 해결 방법
추가 LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
오류 4
# 오류 로그
AH00526: Syntax error on line 106 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf:
Invalid command 'User', perhaps misspelled or defined by a module not included in the server configuration
# 해결 방법
추가 LoadModule unixd_module modules/mod_unixd.so
오류 5
# 오류 로그
AH00526: Syntax error on line 214 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
# 해결 방법
추가 LoadModule access_compat_module modules/mod_access_compat.so
오류 6
# 오류 로그
[Thu Aug 01 16:16:15.768125 2019] [core:warn] [pid 29604] AH00117: Ignoring deprecated use of DefaultType in line 281 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf.
AH00526: Syntax error on line 325 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf:
Invalid command 'Require', perhaps misspelled or defined by a module not included in the server configuration
# 해결 방법
추가 LoadModule authz_core_module modules/mod_authz_core.so
오류 7
# 오류 로그
[Thu Aug 01 16:17:14.560832 2019] [core:warn] [pid 29690] AH00117: Ignoring deprecated use of DefaultType in line 282 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf.
AH00526: Syntax error on line 353 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf:
Invalid command 'LockFile', perhaps misspel
# 해결 방법
DefaultType text/plain -> ForceType text/plain(모든 응답을 text/plain으로 처리함.) 옵션 제거 할 것
오류 8
# 오류 로그
AH00526: Syntax error on line 353 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf:
Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration
[Mon Aug 05 15:47:04.456821 2019] [core:warn] [pid 26228] AH00117: Ignoring deprecated use of DefaultType in line 280 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf.
AH00526: Syntax error on line 396 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf:
Invalid command 'Allow', perhaps misspelled or defined by a module not included in the server configuration
# 해결 방법
LockFile "logs/accept.lock" -> Mutex file:/home1/irteam/logs default
오류 9
# 오류 로그
AH00526: Syntax error on line 521 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf:
JkWorkersFile: Can't find the workers file specified
# 해결 방법
/home1/irteam/apps/apache/conf/workers.properties 추가
오류 10
# 오류 로그
AH00526: Syntax error on line 600 of /home1/irteam/apps/apache-2.4.39/conf/httpd.conf:
Either all Options must start with + or -, or no Option may.
# 해결 방법
Options -Indexes FollowSymLinks MultiViews
>> Options -Indexes +FollowSymLinks +MultiViews
오류 11
# 오류 로그
AH00548: NameVirtualHost has no effect and will be removed in the next release /home1/irteam/apps/apache-2.4.39/conf/httpd.conf:626
AH00112: Warning: DocumentRoot [/data/images/deploy/doc_base] does not exist
AH00526: Syntax error on line 23 of /home1/irteam/apps/apache/conf/vhost-avatar-static.conf:
Require not allowed in <VirtualHost> context
# 해결 방법
NameVirtualHost 삭제
오류 12
# 오류 로그
[Thu Aug 01 16:30:33.693824 2019] [proxy_balancer:emerg] [pid 31012] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
[Thu Aug 01 16:30:33.693839 2019] [:emerg] [pid 31012] AH00020: Configuration Failed, exiting
# 해결 방법
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so 추가.
오류 13
# 오류 로그
[Thu Aug 01 16:32:06.814692 2019] [jk:warn] [pid 31220] No JkShmFile defined in httpd.conf. Using default /home1/irteam/apps/apache/logs/jk-runtime-status
[Thu Aug 01 16:32:06.833689 2019] [jk:warn] [pid 31224] No JkShmFile defined in httpd.conf. Using default /home1/irteam/apps/apache/logs/jk-runtime-status
# 해결 방법
JkShmFile /usr/local/apache2/logs/mod_jk.shm
'Server > Apache' 카테고리의 다른 글
Apache 2.4 설치 (0) | 2020.02.07 |
---|