Can the Apache Module mod_access_compat Safely Be Disabled in Apache2.4?

The documentation for mod_access_compat states:

The directives provided by mod_access_compat have been deprecated by mod_authz_host.

So as long as any deprecated Order, Allow, and Deny directives are removed from Apache configuration files, it's safe to disable the module.

sudo a2dismod access_compat

If you've missed of the old style directives in your configs, Apache will fail to restart and point to the instance of the old syntax:

AH00526: Syntax error on line 23 of /etc/apache2/sites-enabled/google.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server config
Action 'start' failed.
The Apache error log may have more information.
apache2.service: Control process exited, code=exited, status=1/FAILURE

Just remove the offending directives and restart Apache again, and repeat until the restart succeeds. See the 'Access Control' section of the Apache 2.2 -> 2.4 upgrade guide for details on how migrate your configs to the new syntax.

Tags

 Apache 2.4  Apache 2  Apache  mod_access_compat  Apache modules  system administration  Apache performance tuning