PDA

View Full Version : SuSE 10.0 Apache Error


Salen
9th December 2005, 15:22
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:

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

falko
9th December 2005, 16:48
What's in /etc/apache2/mod_log_config.conf?

Salen
12th December 2005, 16:20
Here is what is currently in my mod_log_config.conf :

#
# 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.

falko
12th December 2005, 16:47
Do you have something like 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

SuSEconfig
/etc/init.d/apache2 start

Salen
12th December 2005, 17:46
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.

SpikedGoat
28th May 2006, 01:01
I am having the same problem, from the posts I am not understanding how the proplem was fixed. Any help would be great.

falko
28th May 2006, 22:43
Open /etc/sysconfig/apache2 and add config_log to the APACHE_MODULES line. Save the file and run
SuSEconfig
/etc/init.d/apache2 start