I have just updated to Apache 2.4 and have been hit by a massive wave of now missing modules, presumably they have been set to disabled by default.

I have been getting errors in the format Invalid command 'NAME', perhaps misspelled or defined by a module not included in the server configuration then Googling what provides that and including the module.

However the one below has me stumped, what have I missed?

Stopping httpd:                                            [FAILED]
Starting httpd: [Mon May 07 14:42:22.523264 2012] [core:warn] [pid 30648:tid 3082909440]
AH00117: Ignoring deprecated use of DefaultType in line 81 of /etc/httpd/conf/httpd.conf.
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/ips.conf:6
AH00526: Syntax error on line 27 of /etc/httpd/conf/extra/httpd-deflate.conf:
Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

The module section at the top of my httpd.conf

LoadModule authz_core_module /usr/lib/apache/mod_authz_core.so
LoadModule filter_module /usr/lib/apache/mod_filter.so
LoadModule mime_module /usr/lib/apache/mod_mime.so
LoadModule unixd_module /usr/lib/apache/mod_unixd.so
LoadModule authz_host_module /usr/lib/apache/mod_authz_host.so
LoadModule access_compat_module /usr/lib/apache/mod_access_compat.so
LoadModule env_module /usr/lib/apache/mod_env.so
LoadModule alias_module /usr/lib/apache/mod_alias.so
LoadModule negotiation_module /usr/lib/apache/mod_negotiation.so
LoadModule autoindex_module /usr/lib/apache/mod_autoindex.so
LoadModule log_config_module /usr/lib/apache/mod_log_config.so
LoadModule ssl_module /usr/lib/apache/mod_ssl.so
LoadModule auth_basic_module /usr/lib/apache/mod_auth_basic.so
LoadModule auth_digest_module /usr/lib/apache/mod_auth_digest.so
LoadModule authn_file_module /usr/lib/apache/mod_authn_file.so
LoadModule authz_user_module /usr/lib/apache/mod_authz_user.so
LoadModule dav_module /usr/lib/apache/mod_dav.so
LoadModule dav_fs_module /usr/lib/apache/mod_dav_fs.so
LoadModule dav_lock_module /usr/lib/apache/mod_dav_lock.so

Thanks for your time!

  • There are a tonne of changes from 2.2 to 2.4, modules have changed a lot. Also, many 3rd party modules are incompatible with 2.4.
    – Chris S
    Aug 24 '12 at 13:49

You cannot blindly use an apache 2.2 configuration file with apache 2.4 !

For one, module names have changed, and been added/removed, and for another, the configuration syntax has undergone some (incompatibel) changes.

Refer to the official 2.4 documentation.

Also note that you will have to re-install/rebuild any and all 3rd-party modules, since apache modules must be built for the specific server they will be used with (most notably, mod_php requires a new package.)

Your specific question regarding the Header directive:

Loadmodule header_module /path/to/mod_header.so

I had the same problem after upgrade to FC 18 (httpd-2.4.3) from FC 17 (httpd-2.2x)

I have solved it by commenting out all incompatible directives described on: http://httpd.apache.org/docs/2.4/upgrading.html

I have added string to file /etc/httpd/conf/httpd.conf:

Include conf.modules.d/*.conf


KeepAliveTimeout 5

and before

<IfModule prefork.c>

Also, I have added directives:

<IfModule mod_unixd.c>
User apache
Group apache

under all commented # LoadModule directives

  • Per the other answer, you can't use 2.2 config, which is what I'm assuming you're including.
    – AlxVallejo
    Dec 3 '15 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.