
最終的に CentOS 5 から 7 に移行することに決めましたが、yum またはサーバー内から httpd モジュールを取得できません。
apache 2.2
盲目的に config を使用することはできず2.4
、モジュール名が変更または削除される可能性があると読みました。何が変更されたかを知るにはどうすればよいですか?
yum からモジュールを取得するにはどうすればよいですか? yum whatprovides mod_authz_default.so はパッケージを返しません。
1 つずつコメントアウトしていくと、次のものがリストされます。はい、/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.c
、GitHub からソースをダウンロードしてコンパイルしました。
例:
[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 の代わりに、server centos 7 mod_cache_disk を検索できます。この画像リンクでわかるように:https://prnt.sc/10jpipm