Can’t start httpd centos 6 apache 2.2

apache-2.2centos6

I try to start httpd on centos 6 / apache 2.2 but get the following error:

/etc/init.d/httpd start
Starting httpd: [Sun Nov 08 20:47:36 2015] [warn] module php5_module is already loaded, skipping
Syntax error on line 5 of /etc/httpd/conf/extra/httpd-directories.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
                                                           [FAILED]

After searching i found some solutions like changing

Order deny,allow
Deny from all

to

Require all denied

But this is for apache 2.4 and i'm running 2.2

Kinda stuck here and all the websites are down. Can anybody help me out?

EDIT:

This is my httpd-directories.conf file:

<Directory />
    Options SymLinksIfOwnerMatch
        AllowOverride None

        Order Deny,Allow
        Deny from All
</Directory>

<Directory /home>
        AllowOverride AuthConfig FileInfo Indexes Limit Options=Includes,IncludesNOEXEC,Indexes,ExecCGI,MultiViews,SymLinksIfOwnerMatch,None
        Options IncludesNoExec Includes SymLinksIfOwnerMatch ExecCGI

        <Limit GET POST OPTIONS PROPFIND>
                Order allow,deny
                Allow from all
        </Limit>
        <LimitExcept GET POST OPTIONS PROPFIND>
                Order deny,allow
                Deny from all
        </LimitExcept>
</Directory>

<Directory /var/www/html>
        Options SymLinksIfOwnerMatch
        AllowOverride AuthConfig FileInfo Indexes Limit Options=Includes,IncludesNOEXEC,Indexes,ExecCGI,MultiViews,SymLinksIfOwnerMatch,None

        Order allow,deny
        Allow from all
        <IfModule mod_suphp.c>
                suPHP_Engine On
                suPHP_UserGroup webapps webapps
                SetEnv PHP_INI_SCAN_DIR
        </IfModule>
</Directory>

<Directory /var/www/cgi-bin>
        AllowOverride None
        Options None

        Order allow,deny
        Allow from all
</Directory>

Best Answer

It looks like you're missing the authz_host module, ensure that your /etc/httpd/conf/httpd.conf file has a line like

LoadModule authz_host_module modules/mod_authz_host.so

in it. If I comment that line out of my httpd.conf, I get the same error as you see.

Related Topic