Cannot load modules/mod_authn_default.so

Issues related to applications and software problems
Post Reply
nccuong
Posts: 2
Joined: 2021/12/16 09:34:23

Cannot load modules/mod_authn_default.so

Post by nccuong » 2021/12/16 09:46:20

hello Admin and every one.
I install a new Centos 7 (release 7.9.2009 (Core)
I copy content from /etc/httpd/conf/httpd.conf on old server (centos 6.10) to file /etc/httpd/conf/httpd.conf on new server (Centos 7 (release 7.9.2009 (Core).
After that, I start service httpd on new serrver, but httpd service not running and have error:
Dec 16 20:55:33 vm1-huawei1 httpd[19847]: httpd: Syntax error on line 157 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_authn_default.so into server: /et...r directory
Could you recomment what i should do to resolve this problem
I use http Server version: Apache/2.4.6 (CentOS)
Thanks and Brgs
Nguyen Chi Cuong

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot load modules/mod_authn_default.so

Post by TrevorH » 2021/12/16 18:14:12

You cannot just copy the config file from a CentSO 6 to a CentSO 7 system for httpd. CentOS 6 used apache httpd 2.2.15 and CentOS 7 uses the 2.4 series. There were major and breaking changes in the config files between the two versions.

I'd suggest that you save your current el6 config file somewhere safe then diff it against the vanilla CentOS 6 supplied file to see what changes were made. Then apply those changes - or at least the httpd 2.4 version of those changes - to your CentOS 7 file. Wherever possible, it's recommended to leave /etc/httpd/conf/httpd.conf alone and put your changes in separate files in /etc/httpd/conf.d/ instead.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

nccuong
Posts: 2
Joined: 2021/12/16 09:34:23

Re: Cannot load modules/mod_authn_default.so

Post by nccuong » 2021/12/17 01:31:12

Thanks for your recomment
Brgs
Nguyen Chi Cuong

Post Reply