2021. 1. 9. 10:37ㆍWeb Server/Apache
systemctl start httpd 실행
1월 06 21:20:30 localhost.localdomain httpd[7627]: httpd: Syntax error on line 59 of /etc/httpd/conf/httpd.conf: Can't locate API module structure `jk_moudle' in file /etc/ht>
오타로 인한 에러
LoadModule jk_module modles/mode_jk.so -> LoadModule jk_module modules/mode_jk.so
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2021-01-09 12:51:52 KST; 14s ago
Docs: man:httpd.service(8)
Process: 3998 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 3998 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
1월 09 12:51:51 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
1월 09 12:51:52 localhost.localdomain systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
1월 09 12:51:52 localhost.localdomain systemd[1]: httpd.service: Failed with result 'exit-code'.
1월 09 12:51:52 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
SELINUX 보안 때문에 발생한 에러 : 임시 보안해제로 해결
vi /etc/selinux/config
SELINUX=disabled
#SELINUX=enforcing
재기동
reboot
SELINUX 보안 때문에 발생한 에러 : 원인 확인 및 조치
vi /etc/selinux/config
SELINUX=permissive
selinux 재시작
setenforce 1
selinux 상태확인
getenforce
Permissive
systemctl start httpd
grep "type=AVC" /var/log/audit/audit.log
type=AVC msg=audit(1610164312.216:128): avc: denied { map } for pid=3998 comm="httpd" path="/run/httpd/mod_jk.shm.3998" dev="tmpfs" ino=60267 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_var_run_t:s0 tclass=file permissive=0
audit2why < /var/log/audit/audit.log
type=AVC msg=audit(1610164312.216:128): avc: denied { map } for pid=3998 comm="httpd" path="/run/httpd/mod_jk.shm.3998" dev="tmpfs" ino=60267 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_var_run_t:s0 tclass=file permissive=0 Was caused by: The boolean domain_can_mmap_files was set incorrectly. Description: Allow domain to can mmap files Allow access by executing: # setsebool -P domain_can_mmap_files 1
getsebool domain_can_mmap_files
domain_can_mmap_files --> off
setsebool -P domain_can_mmap_files 1
vi /etc/selinux/config
SELINUX=enforcing
setenforce 1
getenforce
Enforcing
systemctl restart httpd
'Web Server > Apache' 카테고리의 다른 글
조치 방법 모름 (0) | 2021.01.09 |
---|---|
아파치 버전 확인 (0) | 2021.01.09 |
module 내용 보기 (0) | 2021.01.06 |
아파치 설치 (0) | 2021.01.04 |