Results 1 to 7 of 7

Thread: Invalid command 'SecRuleEngine'

  1. #1
    Bucciacas NNTP User

    Question Invalid command 'SecRuleEngine'

    I have just installed SuSE 11.1. When I try to start Apache 2 from the command line I get the following:

    Starting httpd2 (prefork) Syntax error on line 2 of /etc/apache2/conf.d/mod_security2.conf:
    Invalid command 'SecRuleEngine', perhaps misspelled or defined by a module not included in the server configuration

    When I try to install it using YAST I get the following

    Cannot adjust 'Apache2' service

    I have narrowed it down to ModSecurity. I have reinstalled all the Apache 2 apps and all the required libraries and modules. No luck. Is it something I am doing? Any help and advice you can offer would be greatly appreciated.

    Thanks,
    Bucciacas

  2. #2
    hkellner NNTP User

    Default Re: Invalid command 'SecRuleEngine'

    Add in the configuration file /etc/sysconfig/apache2
    in the string APACHE_MODULES="....security2"
    restart apache2

  3. #3

    Default Re: Invalid command 'SecRuleEngine'

    I had the exact same problem. I solved it by simply uninstalling that security2 thing.
    Now it works.
    If you can not live without that security2 thing, let us know how you solved it.

  4. #4
    cdelellis NNTP User

    Default Re: Invalid command 'SecRuleEngine'

    Hi all

    I changed the setting in the /etc/sysconfig/apache like described in this thread. But still apache still didn't start. I had to create a file named /srv/www/logs/modsec_debug.log with rwx 755 and now it works fine.

    Have a nice day.

    Carsten

  5. #5
    Join Date
    Mar 2009
    Location
    Tilburg, NL
    Posts
    2

    Default Re: Invalid command 'SecRuleEngine'

    Quote Originally Posted by cdelellis View Post
    I changed the setting in the /etc/sysconfig/apache like described in this thread. But still apache still didn't start. I had to create a file named /srv/www/logs/modsec_debug.log with rwx 755 and now it works fine.
    I did that too, and...

    [Sat Mar 28 23:27:56 2009] [notice] caught SIGTERM, shutting down
    [Sat Mar 28 23:27:56 2009] [notice] ModSecurity for Apache/2.5.6 (ModSecurity: Open Source Web Application Firewall) configured.
    [Sat Mar 28 23:27:57 2009] [notice] Apache/2.2.10 (Linux/SUSE) PHP/5.2.8 with Suhosin-Patch configured -- resuming normal operations

    It works! (Don't know why, to be honest. 8^)
    Harricot

  6. #6
    Vanyamba NNTP User

    Default Re: Invalid command 'SecRuleEngine'

    Also log-directory should be created:
    # mkdir /srv/www/logs/

  7. #7
    moecklund NNTP User

    Default Re: Invalid command 'SecRuleEngine'

    Man! that was silly
    I had the same problem went around and around.
    Comment all kinds of stuff.
    Created the log folders and log files as recommended above....
    still errors.
    tried to disable the mods left and right...
    Kept getting mod_* not installed.
    Argh
    Then I thought maybe I should try to install the mod_security2
    a2enmod mod_security2
    BAM!!!
    Worked

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •