My Apache environment is pretty heterogeneous. I run Apache in CentOS, and Ubuntu, and several released versions of those linux distros. Oh yea, and also on the Unix based Mac OS X. On a few machines I hand build the Apache stack, and package it up as an rpm. As a result I deal with various Apache configurations versions and releases. Did I mention that I run several virtual environments as well. As a result my apache configurations are all over the place, both literally and figuratively. The other day I discovered this unpleasant apache error message, which actually derailed me for a bit longer than it should have.
AH00526: Syntax error on line 279 of /path/httpd.conf: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
Whoopse, what the heck happened? After floundering around a bit I found this apache documentation on run-time on the subject. The error message should have screamed you updated your apache doofus [ from 2.2 to 2.4 ]. Then I would have found the Apache upgrade 2.4 – 2.4 guide much quicker.
Once I realized this.. I remembered oh yea.. I updated to saucy… I knew there would be some fallout from that upgrade. After digging into this a bit I made the following changes to my Apache configuration.
1: add the following modules for authz
# mod_authz_default is an old Apache 2.2 module.. remove it. #LoadModule authz_default_module modules/mod_authz_default.so # Apache 2.4 additions LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so # Depends: authz_core LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so LoadModule authz_user_module /usr/lib/apache2/modules/mod_authz_user.so LoadModule authz_groupfile_module /usr/lib/apache2/modules/mod_authz_groupfile.s
2: Modify your configuration options
# Apache 2.2 configuration # MaxClients 90 # MaxRequestsPerChild 0 # Apache 2.4 Configuration MaxRequestWorkers 90 MaxConnectionsPerChild 0
3: Modify your directory configurations
# Apache 2.2 configuration # Order deny,allow # Deny from all # Apache 2.4 Configuration Require all denied
Apache versions this document reference:
Apache/2.2.27 (Unix) –> Apache/2.4.6 (Ubuntu)
I mention this because these are the specific versions that this document is written against. However these configuration attributes should be relevant for any 2.2* and 2.4*. Also I mostly run Apache to support django apps, therefore almost all of my apache configurations are MPM Worker mode.