Apache 2 will not start in Beta 5

When trying to start Apache2 on 11.1 Beta 5 I get this error:

CISServer:/home/cis2101 # /etc/init.d/apache2 start
Starting httpd2 (prefork) Syntax error on line 47 of /etc/apache2/listen.conf:
Listen requires 1 or 2 arguments.

The command line was:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
                                                                     failed

I checked in /etc/apache2 for the httpd.conf and it is there is there something that needs to be done to get Apache to work? I use the YaST tool to set it up accepting the defaults that it had.

I have a similar error on OpenSuSE 11 -

I have tried several things to no avail, re-install, switch prefork/worker, reverting to the current update version instead of the apache repository version.

I have disabled modules, but the Yast HTTP Configuration module throws an error

Cannot adjust ‘apache2 service.’

  • as well as the System Run Level module

/etc/init.d/apache2 start returned 1 (unspecified error):
.

The following is one of the several startup log errors:

Syntax error on line 101 of /etc/apache2/server-tuning.conf:
Invalid command ‘BrowserMatch’, perhaps misspelled or defined by a module not included in the server configuration

The command line was:
/usr/sbin/httpd2-worker -f /etc/apache2/httpd.conf

also listed on separate occasions:
“on line 3 of /etc/apache2/mod_security2.conf”
“on line 11 of /etc/apache2/mod_log_config.conf”

I compared the the syntax of the lines to the samples on the apache web site and there is nothing wrong with the config lines. They are all “out of the box”/unmodified by me!

Strangly accross Yast modules I am noticing the default listing of (services, apache modules) is from Z to A in the name collumns.

I am thinking the problem w/apache might be related to something else, I am just not sure what. I think I am just going to do a clean install, Apache has always just run without a hitch for as long as I can remember. (SuSE 7)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Do you have mod_setenvif installed and enabled?

http://httpd.apache.org/docs/2.0/mod/mod_setenvif.html

This is the one that provides BrowserMatch and, as stated in your error
message, if you do not have it included then the string BrowserMatch may
not mean anything and be invalid, causing your problem. In SLE this
file (mod_setenvif.so) comes with the base apache2 package but that may
have changed with newer packages and newer versions of SUSE.

Good luck.

TakeIT2 wrote:
> I have a similar error on OpenSuSE 11 -
>
> I have tried several things to no avail, re-install, switch
> prefork/worker, reverting to the current update version instead of the
> apache repository version.
>
> I have disabled modules, but the Yast HTTP Configuration module throws
> an error
>> Cannot adjust ‘apache2 service.’
> - as well as the System Run Level module
>> /etc/init.d/apache2 start returned 1 (unspecified error):.
>
> The following is one of the several startup log errors:
>
>> Syntax error on line 101 of /etc/apache2/server-tuning.conf:
>> Invalid command ‘BrowserMatch’, perhaps misspelled or defined by a
>> module not included in the server configuration
>>
>>
>> The command line was:
>> /usr/sbin/httpd2-worker -f /etc/apache2/httpd.conf
>>
>
> also listed on separate occasions:
> “on line 3 of /etc/apache2/mod_security2.conf”
> “on line 11 of /etc/apache2/mod_log_config.conf”
>
> I compared the the syntax of the lines to the samples on the apache web
> site and there is nothing wrong with the config lines. They are all “out
> of the box”/unmodified by me!
>
> Strangly accross Yast modules I am noticing the default listing of
> (services, apache modules) is from Z to A in the name collumns.
>
> I am thinking the problem w/apache might be related to something else,
> I am just not sure what. I think I am just going to do a clean install,
> Apache has always just run without a hitch for as long as I can
> remember. (SuSE 7)
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJPWqJ3s42bA80+9kRApRZAJ0QJ3op53jCjqw2s8fUGJDaSZYGzwCfTd4F
0VFxLihtV8AUwE73WWHx2ec=
=bVY+
-----END PGP SIGNATURE-----

Yast’s HTTP Server configuration tool fails to write the correct configuration to /etc/apache2/listen.conf

Open it manually and edit the Listen line to what you think is appropriate.
In my case Listen 127.0.0.1:80

Yes it is installed and enabled. So were the other modules listed in my post. Those other errors were thrown at at boot after updates to the kernel. This is a fresh install that something seems to have gone wanky with. Since, by the time I got to configuring Apache, long after the updates to other parts of the system, there is no real telling at what point errors started happening. I don’t have the time to go through everything - It is a shorter amount of time to do a clean install with an Eye to this potential error before hand, and if it occurs again I hopefully will know where and when.

Incidentally on another machine running 11, I am having the similar issue, but Apache is non-essential on that machine at this point, (it will probably go to 11.1 after the new year.)