Finally I decided to migrate CentOS 5 to 7 but I can't get the httpd modules from yum or within the server.

I read that we can't blindly use apache 2.2 config with 2.4 and module names might been changed or removed. How do I figure out what has it changed to?

How do I get the modules from yum? yum whatprovides mod_authz_default.so returns no package.

I keep commenting out one by one, it'll list out the next one. Yes there are modules in /usr/lib64/httpd/modules but not the ones that old httpd.conf needs.

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.

Solution 1:

It seems these modules have been removed from apache 2.4: mod_authn_default, mod_authz_default, mod_mem_cache. Refer apache upgrade doc

For mod_ident.c and other modules I downloaded the source from GitHub and compiled it.

Example:

[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