본문으로 바로가기

9버전 이상에서는 아래 처럼 아파치를 시작하면 별다른 에러 로그 없이 시작이 안됨

[root@xxxxxxxx

[root@xxxx]# apachectl start
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xeu httpd.service" for details.

아파치 로그를 살펴봐도 별다른게 없음..

구글링을 해보니 아래와 같이 원인을 찾아서 해결 할 수 있는 글귀를 발견 

https://forums.rockylinux.org/t/cant-start-apache/9998/4

 

Can't start Apache

Thanks Ian. That results in “Syntax OK”. The other help folks suggested that one of the modules is not getting loaded and so far everything seems to be as expected. I tried httpd -M and today my plan is to see if one of the desired modules is NOT loade

forums.rockylinux.org

 

아래와 같이 실행하니 해결..

# setenforce 0
# apachectl start
# audit2allow -a /var/log/audit/audit.log
#============= httpd_t ==============

#!!!! This avc can be allowed using the boolean 'domain_can_mmap_files'
allow httpd_t httpd_var_run_t:file map;

#============= logrotate_t ==============

setsebool -P domain_can_mmap_files 1

domain_can_mmap_files 이 RockyOS 9에서는 Sellinux 에 비활성화 되어 있는데 8버전도 아마 그럴듯..