CentOS 7 httpd 모듈이 누락되었습니다.

CentOS 7 httpd 모듈이 누락되었습니다.

마지막으로 CentOS 5를 7로 마이그레이션하기로 결정했지만 yum이나 서버 내에서 httpd 모듈을 가져올 수 없습니다.

apache 2.2나는 우리가 config를 맹목적으로 사용할 수 없으며 2.4모듈 이름이 변경되거나 제거될 수 있다는 것을 읽었습니다. 무엇이 바뀌었는지 어떻게 알 수 있나요?

yum에서 모듈을 어떻게 구하나요? yum whatprovides mod_authz_default.so는 패키지를 반환하지 않습니다.

계속해서 하나씩 댓글을 달고 있는데, 다음 내용이 나열될 것입니다. 예, /usr/lib64/httpd/modules에는 모듈이 있지만 이전 httpd.conf에 필요한 모듈은 없습니다.

Mar 01 16:25:01 myhost httpd[19931]: httpd: Syntax error on line 164 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_authn_default.so into server: /etc/httpd/modules/mod_authn_default.so: cannot open shared object file: No such file or directory
Mar 01 16:25:01 myhost systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 01 16:25:01 myhost kill[19933]: kill: cannot find process ""
Mar 01 16:25:01 myhost systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 01 16:25:01 myhost systemd[1]: Failed to start The Apache HTTP Server.
Mar 01 16:25:01 myhost systemd[1]: Unit httpd.service entered failed state.
Mar 01 16:25:01 myhost systemd[1]: httpd.service failed.
Mar 01 16:39:25 myhost systemd[1]: Starting The Apache HTTP Server...
Mar 01 16:39:25 myhost httpd[20172]: httpd: Syntax error on line 170 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_authz_default.so into server: /etc/httpd/modules/mod_authz_default.so: cannot open shared object file: No such file or directory
Mar 01 16:39:25 myhost systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 01 16:39:25 myhost kill[20174]: kill: cannot find process ""
Mar 01 16:39:25 myhost systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 01 16:39:25 myhost systemd[1]: Failed to start The Apache HTTP Server.
Mar 01 16:39:25 myhost systemd[1]: Unit httpd.service entered failed state.
Mar 01 16:39:25 myhost systemd[1]: httpd.service failed.
Mar 01 16:41:29 myhost systemd[1]: Starting The Apache HTTP Server...
Mar 01 16:41:29 myhost httpd[20195]: httpd: Syntax error on line 185 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_ident.so into server: /etc/httpd/modules/mod_ident.so: cannot open shared object file: No such file or directory
Mar 01 16:41:29 myhost systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 01 16:41:29 myhost kill[20197]: kill: cannot find process ""
Mar 01 16:41:29 myhost systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 01 16:41:29 myhost systemd[1]: Failed to start The Apache HTTP Server.
Mar 01 16:41:29 myhost systemd[1]: Unit httpd.service entered failed state.
Mar 01 16:41:29 myhost systemd[1]: httpd.service failed.

답변1

apache 2.4이 모듈은 mod_authn_default, mod_authz_default, mod_mem_cache 에서 제거된 것 같습니다 .Apache 업그레이드 문서 참조

및 기타 모듈 의 경우 mod_ident.cGitHub에서 소스를 다운로드하여 컴파일했습니다.

예:

[root@myhost ~]# wget https://raw.githubusercontent.com/omnigroup/Apache/master/httpd/modules/metadata/mod_ident.c

[root@myhost ~]# apxs -a -i -c  mod_ident.c

답변2

mod_disk_cache 대신 서버 centos 7 mod_cache_disk를 검색할 수 있습니다. 이 이미지 링크에서 볼 수 있듯이:https://prnt.sc/10jpipm

관련 정보