The new Apache 2.4 has been released a few weeks ago and I decided to use this version while installing a new server (I compiled it from scratch rather that using an rpm or deb).

After using one of my tried and true Apache configuration files, I received this error on start:

Starting httpd: AH00526: Syntax error on line 104 of /usr/local/apache2/conf/httpd.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration

Common wisdom would imply that I should make sure the authz_host module is installed (LoadModule authz_host_module modules/, however this just was not working.

Finally, I discovered that the Order command has been removed from Apache 2.4! According to the upgrade notes for Apache 2.4:

In 2.2, access control based on client hostname, IP address, and other characteristics of client requests was done using the directives Order, Allow, Deny, and Satisfy.

In 2.4, such access control is done in the same way as other authorization checks, using the new module mod_authz_host. The old access control idioms should be replaced by the new authentication mechanisms, although for compatibility with old configurations, the new module mod_access_compat is provided.

Basically, the Order command is depreciated.

In my case, I replaced the lines:

Order deny,allow
Deny from all


Require all denied

Also make sure both of these modules are loaded:

LoadModule authz_core_module modules/
LoadModule authz_host_module modules/

Easy enough, but just be aware that there are several configuration changes between 2.2 and 2.4 which render your old Apache configuration files unusable.


Comments are closed.

You May Also Like

Change your default CPAN mirror

Changing your cpan mirror. Although it seems like it would be easy…

Adding a Module Position in a Joomla 1.5 Template

Adding a module position in a Joomla 1.5 template is not as…

Awesome article on using the VI Text Editor

Awesome article on using vi/vim: Do whatever you want. Don’t learn it…

Password Protected Folder Gives 404 Not Found in WordPress Installation Sub-folder.

Came across this little maddening issue again today after fixing it a…