SuSE 10.0 Apache Error

Discussion in 'HOWTO-Related Questions' started by Salen, Dec 9, 2005.

  1. Salen

    Salen New Member

    I've been following the SuSE 10.0 ISP/Server Configuration located on the site. However when I get to the point where I need to start Apache, I get this error:

    Code:
    webmonkey:~ # /etc/init.d/apache2 start
    Starting httpd2 (prefork) Syntax error on line 11 of /etc/apache2/mod_log_config.conf:
    Invalid command 'LogFormat', perhaps mis-spelled or defined by a module not included in the server configuration
    
    The command line was:
    /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -DSSL
                                                                         failed
    
    Any help would be greatly appreciated.

    Thanks,

    Chris
     
  2. falko

    falko Super Moderator

    What's in /etc/apache2/mod_log_config.conf?
     
  3. Salen

    Salen New Member

    Here is what is currently in my mod_log_config.conf :

    Code:
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive.
    #
    # http://httpd.apache.org/docs-2.0/mod/mod_log_config.html
    #
    
    #
    #         Format string:				Nickname:
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b"			common
    LogFormat "%v %h %l %u %t \"%r\" %>s %b"		vhost_common
    LogFormat "%{Referer}i -> %U"				referer
    LogFormat "%{User-agent}i"				agent
    LogFormat "%h %l %u %t \"%r\" %>s %b \
    \"%{Referer}i\" \"%{User-Agent}i\""			combined
    LogFormat "%v %h %l %u %t \"%r\" %>s %b \
    \"%{Referer}i\" \"%{User-Agent}i\""			vhost_combined
    
    # To use %I and %O, you need to enable mod_logio
    <IfModule mod_logio.c>
    LogFormat "%h %l %u %t \"%r\" %>s %b \
    \"%{Referer}i\" \"%{User-Agent}i\" %I %O"		combinedio
    </IfModule>
    
    # Use one of these when you want a compact non-error SSL logfile on a virtual
    # host basis:
    <IfModule mod_ssl.c>
    Logformat "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \
    \"%r\" %b"						ssl_common
    Logformat "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \
    \"%r\" %b \"%{Referer}i\" \"%{User-Agent}i\""		ssl_combined
    </IfModule>
    
    
    
    Thanks again.
     
  4. falko

    falko Super Moderator

    Do you have something like
    Code:
    LoadModule config_log_module /path/to/mod_log_config.so
    in you Apache configuration?

    You might have to put something like config_log into the APACHE_MODULES line in /etc/sysconfig/apache2 and then run

    Code:
    SuSEconfig
    /etc/init.d/apache2 start
     
  5. Salen

    Salen New Member

    That fixed it. It appeared that when I edited my config I posted exactly what it said, instead of adding just the neccessary fields. By doing so I removed a bunch of the modules causing the error.

    Thanks alot for your help.
     
  6. SpikedGoat

    SpikedGoat New Member

    Same Problem

    I am having the same problem, from the posts I am not understanding how the proplem was fixed. Any help would be great.
     
  7. falko

    falko Super Moderator

    Open /etc/sysconfig/apache2 and add config_log to the APACHE_MODULES line. Save the file and run
    Code:
    SuSEconfig
    /etc/init.d/apache2 start
     

Share This Page