openSUSE Forums > Network/Internet » Apache2 /etc/apache2/mod_log_config error on line #11

Go Back   openSUSE Forums > Network/Internet
Forums FAQ Members List Search Today's Posts Mark Forums Read


Network/Internet Questions about internet applications, network configuration, usage (SAMBA, network printing, NFS)

Reply
Page 1 of 3 1 23
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-Apr-2009, 14:01
Axeia's Avatar
Parent Penguin
 
Join Date: Jul 2008
Location: Netherlands
Posts: 981
Axeia 's reputation will be famous soon enoughAxeia 's reputation will be famous soon enoughAxeia 's reputation will be famous soon enough
Default Apache2 /etc/apache2/mod_log_config error on line #11

Not sure what happened, rebooted my PC, wonder why apache isn't running.. so I tried to start it with "rcapache2 start" as root and get
Code:
Starting httpd2 (prefork) Syntax error on line 11 of /etc/apache2/mod_log_config.conf:
Invalid command 'LogFormat', perhaps misspelled or defined by a module not included in the server configuration

The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
                                                                      failed
So I open up the file in question and don't see anything wrong with it.. though I've no clue as to what it should look like.
Contents are as follows:
Code:
#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# http://httpd.apache.org/docs-2.2/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>
Line 11 is the first logFormat (common)
__________________
Special effects <- KDE 4.2 Showing off
More KDE -> PINK KDE
Reply With Quote
  #2 (permalink)  
Old 05-Apr-2009, 14:41
Explorer Penguin
 
Join Date: Dec 2008
Location: Hamburg
Posts: 165
erikro hasn't been rated much yet
Default Re: Apache2 /etc/apache2/mod_log_config error on line #11

Hi,

Quote:
Originally Posted by Axeia View Post
Not sure what happened, rebooted my PC, wonder why apache isn't running.. so I tried to start it with "rcapache2 start" as root and get
Code:
Starting httpd2 (prefork) Syntax error on line 11 of /etc/apache2/mod_log_config.conf:
Invalid command 'LogFormat', perhaps misspelled or defined by a module not included in the server configuration

The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
                                                                      failed
The syntax is correct. First of all go to

Code:
vi /etc/sysconfig/apache2
and look for the line that begins with

Code:
APACHE_MODULES
There must be

Code:
log_config
in that line. The vi command you may replace with any other editor you like.

hth

Bye

Erik
Reply With Quote
  #3 (permalink)  
Old 05-Apr-2009, 15:11
Axeia's Avatar
Parent Penguin
 
Join Date: Jul 2008
Location: Netherlands
Posts: 981
Axeia 's reputation will be famous soon enoughAxeia 's reputation will be famous soon enoughAxeia 's reputation will be famous soon enough
Default Re: Apache2 /etc/apache2/mod_log_config error on line #11

That worked thanks, didn't get me a whole lot further though
Code:
Module "TypesConfig" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Starting httpd2 (prefork) Syntax error on line 139 of /etc/apache2/httpd.conf:
Invalid command 'TypesConfig', perhaps misspelled or defined by a module not included in the server configuration

The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
Tried adding TypesConfig to the same line but that didn't change anything so I changed it back.
(didn't really expect it to either seeing as it uses caps as seperators instead of underscores)

Any way to reset the defaults? Think somehow running the command:
aen2mod mod_deflate
and then starting the YaST webserver module messed things up, only got
Code:
APACHE_MODULES="deflate php5 config_log"
in /etc/sysconfig/apache2. Think there should be quite a bit more in there?
__________________
Special effects <- KDE 4.2 Showing off
More KDE -> PINK KDE
Reply With Quote
  #4 (permalink)  
Old 05-Apr-2009, 16:13
Explorer Penguin
 
Join Date: Dec 2008
Location: Hamburg
Posts: 165
erikro hasn't been rated much yet
Default Re: Apache2 /etc/apache2/mod_log_config error on line #11

Hi,

Quote:
Originally Posted by Axeia View Post
That worked thanks, didn't get me a whole lot further though
Code:
Module "TypesConfig" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Starting httpd2 (prefork) Syntax error on line 139 of /etc/apache2/httpd.conf:
Invalid command 'TypesConfig', perhaps misspelled or defined by a module not included in the server configuration

The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
Tried adding TypesConfig to the same line but that didn't change anything so I changed it back.
(didn't really expect it to either seeing as it uses caps as seperators instead of underscores)

Any way to reset the defaults? Think somehow running the command:
aen2mod mod_deflate
and then starting the YaST webserver module messed things up, only got
Code:
APACHE_MODULES="deflate php5 config_log"
in /etc/sysconfig/apache2. Think there should be quite a bit more in there?
Code:
# apache's default installation
# APACHE_MODULES="access actions alias asis auth autoindex cgi dir imap include log_config mime negotiation setenvif         status userdir"
That's the default in my sysconfig. For TypesConfig you need mod_mime I think. I'm not 100% sure but give it a shot.

hth

Bye

Erik
Reply With Quote
  #5 (permalink)  
Old 05-Apr-2009, 16:47
Axeia's Avatar
Parent Penguin
 
Join Date: Jul 2008
Location: Netherlands
Posts: 981
Axeia 's reputation will be famous soon enoughAxeia 's reputation will be famous soon enoughAxeia 's reputation will be famous soon enough
Default Re: Apache2 /etc/apache2/mod_log_config error on line #11

Pasted the line and got.
Code:
# rcapache2 start
Module "access" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Module "auth" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Module "imap" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Starting httpd2 (prefork) Syntax error on line 10 of /etc/apache2/mod_status.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration

The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
Uff.. wonder what's going on.
__________________
Special effects <- KDE 4.2 Showing off
More KDE -> PINK KDE
Reply With Quote
  #6 (permalink)  
Old 05-Apr-2009, 17:09
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,222
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: Apache2 /etc/apache2/mod_log_config error on line #11

If you pasted that line in with the # in front, then it would have no effect, as it's a comment. You need far more modules than three of four. Look at the sample line provided and use that, adding php5.
Reply With Quote
  #7 (permalink)  
Old 05-Apr-2009, 17:35
Axeia's Avatar
Parent Penguin
 
Join Date: Jul 2008
Location: Netherlands
Posts: 981
Axeia 's reputation will be famous soon enoughAxeia 's reputation will be famous soon enoughAxeia 's reputation will be famous soon enough
Default Re: Apache2 /etc/apache2/mod_log_config error on line #11

Quote:
Originally Posted by ken_yap View Post
If you pasted that line in with the # in front, then it would have no effect, as it's a comment. You need far more modules than three of four. Look at the sample line provided and use that, adding php5.
Ye, left the comment character out.

I managed to fix it.. be it in a somewhat silly way (pulling in 220MB of software for probably some textfile changes).
Set YaST software management to patterns, selected LAMP server and forced a "upgrade unconditionally".

PHP5 was yet again disabled, so I enabled it via YaST control center > Network Services > HTTP Server. (followed by a rcapache2 restart)

Thanks for the help.
__________________
Special effects <- KDE 4.2 Showing off
More KDE -> PINK KDE
Reply With Quote
  #8 (permalink)  
Old 06-Apr-2009, 06:29
Explorer Penguin
 
Join Date: Dec 2008
Location: Hamburg
Posts: 165
erikro hasn't been rated much yet
Default Re: Apache2 /etc/apache2/mod_log_config error on line #11

Hi,

Quote:
Originally Posted by Axeia View Post
Pasted the line and got.
Code:
# rcapache2 start
Module "access" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Module "auth" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Module "imap" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Starting httpd2 (prefork) Syntax error on line 10 of /etc/apache2/mod_status.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration

The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
Uff.. wonder what's going on.
Seems your Apache is broken. Order is part of the auth module which is part of the basic installation of Apache. I think the best solution is to reinstall the Apache server and begin from the scratch. You can force the zypper to install the apache again without uninstall it with:

Code:
zypper in -f apache2
Make a backup of your config files before doing so.

hth

Bye

Erik
Reply With Quote
  #9 (permalink)  
Old 09-May-2009, 10:09
Puzzled Penguin
 
Join Date: Jan 2009
Posts: 31
SuseNeo hasn't been rated much yet
Default Re: Apache2 /etc/apache2/mod_log_config error on line #11

I'm having similar problem. Running openSUSE 11.0 on Lenovo 3000 N100.

I've uninstalled and reinstalled apache2 3 times using YAST, to no avail. Installed from YAST:
apache2
apaches-devel
apache2-doc
apache2-example-pages
apache2-mod_Apparmor
apache2-mod_php5
apache2-mod_tidy
apache2-prefork
apache2-utils
This is the response I get when I run "rcapache2 start":
Quote:
linux-pczd:/home/eric # rcapache2 start
Module "include" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Module "log_config" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Module "status" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Starting httpd2 (prefork) Syntax error on line 11 of /etc/apache2/mod_log_config.conf:
Invalid command 'LogFormat', perhaps misspelled or defined by a module not included in the server configuration
All the supposedly missing modules seem to be installed:

Quote:
# your settings
APACHE_MODULES="authz_host actions alias auth_basic authz_groupfile authn_file authz_user autoindex cgi dir include log_config mime negotiation setenvif status userdir asis imagemap php5 authz_default"
Reply With Quote
  #10 (permalink)  
Old 09-May-2009, 18:17
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,222
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: Apache2 /etc/apache2/mod_log_config error on line #11

Make sure that's one long line, not broken into two lines. Also make sure it's the only active line that sets APACHE_MODULES and any others are commented out (the last one wins).
Reply With Quote
Reply
Page 1 of 3 1 23

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2