2

I installed a ffmpeg module on a web server (centos)

after that httpd broke.

How can I fixed it?

when I typed:

/etc/init.d/httpd start

I got this error:

Starting httpd: 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]

And the content of httpd-directories.conf is:

<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>
  • Do you also upgrade Apache to 2.4? Googling with query Invalid command 'Order' will take you to common problem when upgrading apache 2.2 -> 2.4 – masegaloeh May 17 '14 at 6:43
  • No I don't upgrate Apache,I just installed ffmpeg module – user2726957 May 17 '14 at 11:49
  • Please post the apache version (by running apachectl -v) and all module loaded by apache (by running apachectl -M) – masegaloeh May 17 '14 at 12:46
  • Your configuration is invalid. <Directory /> should not have just /, but should contain full path to your web root. – phoops May 19 '14 at 7:46
  • @edvinas.me - the configuration is valid, see httpd.apache.org/docs/2.2/mod/core.html#directory – dartonw Jun 23 '14 at 6:39
1

Replace these lines:

Order Deny,Allow
Deny from All

With:

Require all denied

Also make sure both of these modules are loaded:

LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so

Source: http://systembash.com/content/apache-2-4-upgrade-and-the-invalid-command-order-error/

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.