Cannot define multiple Listeners on the same IP:port

f.gruber

New Member
Apache2 auf localhost startet nicht mehr. Die Fehlermeldungen:
HTML:
systemd[1]: Starting The Apache Webserver...
start_apache2[4688]: AH00526: Syntax error on line 3 of /etc/apache2/default-server.conf:
start_apache2[4688]: Cannot define multiple Listeners on the same IP:port

Ich weiß nicht, woher da plötzlich mehrere Listeners kommen sollen :confused: Der Rechner hat eine IP Adresse im LAN: 10.0.0.60

Am Anfang der /etc/apache2/default-server.conf steht schlicht folgendes:
HTML:
ServerName localhost
ServerAdmin root@localhost
Listen 80
Listen 443
Es scheint einen Zusammenhang mit dem Upgrade von Suse 42.3 zu 15.0 zu geben.
Da meine Recherchen im Internet keinen Lösungsansatz gezeigt haben, wende ich mich mit der Bitte um Hilfe an dieses Forum.
Bin dankbar für jeden Tipp.
 
Schau doch mal wo bei deinen Konfigs das Listen definiert wird:
Code:
grep -R -B4 -A4 -ni Listen /etc/apache2/
 
Schau doch mal wo bei deinen Konfigs das Listen definiert wird:
Ich kann da nichts außergewöhnliches herauslesen.
Code:
grep -R -B4 -A4 -ni Listen /etc/apache2/
Code:
/etc/apache2/conf.d/mod_nss.conf-18-# and "NSSEngine on" for mod_nss) cannot be active simultaneously, at a
/etc/apache2/conf.d/mod_nss.conf-19-# global scope, or in the context of a VirtualHost configuration directive
/etc/apache2/conf.d/mod_nss.conf-20-# block.
/etc/apache2/conf.d/mod_nss.conf-21-#
/etc/apache2/conf.d/mod_nss.conf:22:# If for a port that apache listens on, only one VirtualHost section
/etc/apache2/conf.d/mod_nss.conf-23-# has the directive "NSSEngine" set to "on", it will have precedence over
/etc/apache2/conf.d/mod_nss.conf-24-# all other VirtualHost declarations (that may have SSLEngine set to on
/etc/apache2/conf.d/mod_nss.conf-25-# in their context). A simultaneaous operation of both modules for different
/etc/apache2/conf.d/mod_nss.conf-26-# VirtualHosts on the same IP Address and port is not possible.
--
/etc/apache2/conf.d/mod_nss.conf-66-#
/etc/apache2/conf.d/mod_nss.conf-67-# To get SSL/TLS support activated in apache, two things have to be done:
/etc/apache2/conf.d/mod_nss.conf-68-# a) configure and initialize the crypto module that provides the SSL/TLS
/etc/apache2/conf.d/mod_nss.conf-69-#    protocol support in apache
/etc/apache2/conf.d/mod_nss.conf:70:# b) tell apache to listen on the port where browsers typically connect to
/etc/apache2/conf.d/mod_nss.conf-71-#    if they want to talk SSL/TLS. Normally TCP port 443.
/etc/apache2/conf.d/mod_nss.conf-72-#
/etc/apache2/conf.d/mod_nss.conf-73-# about a):
/etc/apache2/conf.d/mod_nss.conf-74-# The apache module (a shared object file) is loaded by the framework if
--
/etc/apache2/conf.d/mod_nss.conf-85-# conditional for the loading of the module, which is evident when looking at
/etc/apache2/conf.d/mod_nss.conf-86-# the "<IfModule mod_ssl.c>" that shows up further below.
/etc/apache2/conf.d/mod_nss.conf-87-#
/etc/apache2/conf.d/mod_nss.conf-88-# about b)
/etc/apache2/conf.d/mod_nss.conf:89:# The Listen directive in /etc/apache2/listen_nss.conf is conditional on
/etc/apache2/conf.d/mod_nss.conf-90-# the server-flag "SSL". Add the word SSL to the variable 
/etc/apache2/conf.d/mod_nss.conf-91-# APACHE_SERVER_FLAGS in the file /etc/sysconfig/apache2 .
/etc/apache2/conf.d/mod_nss.conf-92-#
/etc/apache2/conf.d/mod_nss.conf:93:# Please note that /etc/apache2/listen.conf is read/included from the apache
/etc/apache2/conf.d/mod_nss.conf-94-# main configuration file /etc/apache2/httpd.conf; 
/etc/apache2/conf.d/mod_nss.conf:95:# /etc/apache2/listen_nss.conf is read from this file, just below.
/etc/apache2/conf.d/mod_nss.conf-96-#
/etc/apache2/conf.d/mod_nss.conf-97-# Additional information can also be found in 
/etc/apache2/conf.d/mod_nss.conf-98-# /usr/share/doc/packages/apache2-mod_nss/README-SUSE.txt
/etc/apache2/conf.d/mod_nss.conf-99-#
--
/etc/apache2/conf.d/mod_nss.conf-104-<IfDefine SSL>
/etc/apache2/conf.d/mod_nss.conf-105-<IfDefine !NOSSL>
/etc/apache2/conf.d/mod_nss.conf-106-<IfModule mod_nss.c>
/etc/apache2/conf.d/mod_nss.conf-107-
/etc/apache2/conf.d/mod_nss.conf:108:Include /etc/apache2/listen_nss.conf
/etc/apache2/conf.d/mod_nss.conf-109-IncludeOptional /etc/apache2/mod_nss.d/*.conf
/etc/apache2/conf.d/mod_nss.conf-110-
/etc/apache2/conf.d/mod_nss.conf-111-
/etc/apache2/conf.d/mod_nss.conf-112-
--
/etc/apache2/listen.conf:1:# Listen: Allows you to bind Apache to specific IP addresses and/or
/etc/apache2/listen.conf-2-# ports. See also the <VirtualHost> directive.
/etc/apache2/listen.conf-3-#
/etc/apache2/listen.conf:4:# http://httpd.apache.org/docs/2.4/mod/mpm_common.html#listen
/etc/apache2/listen.conf-5-#
/etc/apache2/listen.conf:6:# Change this to Listen on specific IP addresses as shown below to 
/etc/apache2/listen.conf-7-# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
/etc/apache2/listen.conf-8-#
/etc/apache2/listen.conf:9:# When we also provide SSL we have to listen to the 
/etc/apache2/listen.conf-10-# standard HTTP port (see above) and to the HTTPS port
/etc/apache2/listen.conf-11-#
/etc/apache2/listen.conf-12-# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
/etc/apache2/listen.conf:13:#       Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
/etc/apache2/listen.conf-14-#
/etc/apache2/listen.conf:15:#Listen 12.34.56.78:80
/etc/apache2/listen.conf:16:#Listen 80
/etc/apache2/listen.conf:17:#Listen 443
/etc/apache2/listen.conf-18-
/etc/apache2/listen.conf:19:Listen 80
/etc/apache2/listen.conf-20-
/etc/apache2/listen.conf-21-<IfDefine SSL>
/etc/apache2/listen.conf-22-    <IfDefine !NOSSL>
/etc/apache2/listen.conf-23-    <IfModule mod_ssl.c>
/etc/apache2/listen.conf:24:        Listen 443
/etc/apache2/listen.conf-25-    </IfModule>
/etc/apache2/listen.conf-26-    </IfDefine>
/etc/apache2/listen.conf-27-</IfDefine>
/etc/apache2/listen.conf-28-
--
/etc/apache2/listen_nss.conf:1:# This is /etc/apache2/listen-nss.conf
/etc/apache2/listen_nss.conf-2-#
/etc/apache2/listen_nss.conf-3-# This file is read from /etc/apache2/conf.d/mod_nss.conf ,
/etc/apache2/listen_nss.conf-4-# the starting point for all configuration of mod_nss.
/etc/apache2/listen_nss.conf-5-#
--
/etc/apache2/listen_nss.conf-7-# /etc/apache2/conf.d/mod_nss.conf for information and
/etc/apache2/listen_nss.conf-8-# instructions about how to enable mod_nss.
/etc/apache2/listen_nss.conf-9-#
/etc/apache2/listen_nss.conf-10-#
/etc/apache2/listen_nss.conf:11:# There are two conditions that have to be met for the Listen directive
/etc/apache2/listen_nss.conf-12-# below to become active:
/etc/apache2/listen_nss.conf-13-# a) The server define "SSL" is present; this means that the apache process
/etc/apache2/listen_nss.conf-14-#    is launched with the commandline arguments "-D SSL".
/etc/apache2/listen_nss.conf-15-# b) The nss apache module is loaded, which happens automatically if you add
/etc/apache2/listen_nss.conf-16-#    the name of the module ("nss") to the variable APACHE_MODULES in
/etc/apache2/listen_nss.conf-17-#    /etc/sysconfig/apache2
/etc/apache2/listen_nss.conf-18-#
/etc/apache2/listen_nss.conf-19-# An equivalent section for mod_ssl (openssl based support for SSL/TLS)
/etc/apache2/listen_nss.conf:20:# is contained in the file /etc/apache2/listen.conf, with the dependency to
/etc/apache2/listen_nss.conf-21-# the module "ssl" loaded ("<IfModule mod_ssl.c>").
/etc/apache2/listen_nss.conf-22-# 
/etc/apache2/listen_nss.conf:23:# The difference between this file and listen.conf is that listen.conf is 
/etc/apache2/listen_nss.conf-24-# read (included) from apache's main configuration file /etc/apache2/httpd.conf,
/etc/apache2/listen_nss.conf-25-# while _this_ file is included from /etc/apache2/conf.d/mod_nss.conf .
/etc/apache2/listen_nss.conf-26-
/etc/apache2/listen_nss.conf-27-<IfDefine SSL>
/etc/apache2/listen_nss.conf-28-    <IfDefine !NOSSL>
/etc/apache2/listen_nss.conf:29:        # mod_ssl may be active and has triggered the Listen directive for 443.
/etc/apache2/listen_nss.conf:30:        # In this case we refrain from doing a second Listen, as the 
/etc/apache2/listen_nss.conf-31-        # correspondance between the bound port and the VirtualHost does 
/etc/apache2/listen_nss.conf-32-        # not happen here anyway.
/etc/apache2/listen_nss.conf-33-        <IfModule !mod_ssl.c>
/etc/apache2/listen_nss.conf-34-            <IfModule mod_nss.c>
/etc/apache2/listen_nss.conf-35-
/etc/apache2/listen_nss.conf:36:                Listen 443
/etc/apache2/listen_nss.conf-37-
/etc/apache2/listen_nss.conf-38-            </IfModule>
/etc/apache2/listen_nss.conf-39-        </IfModule>
/etc/apache2/listen_nss.conf-40-    </IfDefine>
--
/etc/apache2/httpd.conf-24-#  | 
/etc/apache2/httpd.conf-25-#  |-- uid.conf  . . . . . . . . . . . . . .  UserID/GroupID to run under
/etc/apache2/httpd.conf-26-#  |-- server-tuning.conf  . . . . . . . . .  sizing of the server (how many processes to start, ...)
/etc/apache2/httpd.conf-27-#  |-- loadmodule.conf . . . . . . . . . . .  [*] load these modules
/etc/apache2/httpd.conf:28:#  |-- listen.conf . . . . . . . . . . . . .  IP adresses / ports to listen on
/etc/apache2/httpd.conf-29-#  |-- mod_log_config.conf . . . . . . . . .  define logging formats
/etc/apache2/httpd.conf-30-#  |-- global.conf . . . . . . . . . . . . .  [*] server-wide general settings
/etc/apache2/httpd.conf-31-#  |-- mod_status.conf . . . . . . . . . . .  restrict access to mod_status (server monitoring)
/etc/apache2/httpd.conf-32-#  |-- mod_info.conf . . . . . . . . . . . .  restrict access to mod_info
--
/etc/apache2/httpd.conf-62-#  |   `-- ... . . . . . . . . . . . . . . .  other configuration added by packages
/etc/apache2/httpd.conf-63-#  |-- default-server.conf
/etc/apache2/httpd.conf-64-#  |-- errors.conf
/etc/apache2/httpd.conf-65-#  |-- httpd.conf  . . . . . . . . . . . . .  top level configuration file
/etc/apache2/httpd.conf:66:#  |-- listen.conf
/etc/apache2/httpd.conf-67-#  |-- magic
/etc/apache2/httpd.conf-68-#  |-- mime.types -> ../mime.types
/etc/apache2/httpd.conf-69-#  |-- mod_autoindex-defaults.conf
/etc/apache2/httpd.conf-70-#  |-- mod_info.conf
--
/etc/apache2/httpd.conf-113-<IfDefine !SYSCONFIG>
/etc/apache2/httpd.conf-114-  Include /etc/apache2/loadmodule.conf
/etc/apache2/httpd.conf-115-</IfDefine>
/etc/apache2/httpd.conf-116-
/etc/apache2/httpd.conf:117:# IP addresses / ports to listen on
/etc/apache2/httpd.conf:118:Include /etc/apache2/listen.conf
/etc/apache2/httpd.conf-119-
/etc/apache2/httpd.conf-120-# predefined logging formats
/etc/apache2/httpd.conf-121-Include /etc/apache2/mod_log_config.conf
/etc/apache2/httpd.conf-122-
--
/etc/apache2/default-server.conf-1-ServerName localhost
/etc/apache2/default-server.conf-2-ServerAdmin root@localhost
/etc/apache2/default-server.conf:3:Listen 80
/etc/apache2/default-server.conf:4:Listen 443
/etc/apache2/default-server.conf-5-
/etc/apache2/default-server.conf-6-DocumentRoot "/srv/www/htdocs"
/etc/apache2/default-server.conf-7-AddDefaultCharset utf-8
/etc/apache2/default-server.conf-8-
 
Du definierst die Listen Directive für jeden Port zweimal. Einmal in /etc/apache2/listen.conf und einmal in der default-server.conf. Eine von beiden ist überflüssig. Ich würde sagen, die müssen aus der default-server.conf raus. Bei Debian sieht die Dateistruktur in /etc/apache2 etwas anders aus, daher kann ich (als Debian-User) nicht mit Sicherheit sagen, wie es bei OpenSUSE aussehen müßte.
 
Du definierst die Listen Directive für jeden Port zweimal. Einmal in /etc/apache2/listen.conf und einmal in der default-server.conf. Eine von beiden ist überflüssig. Ich würde sagen, die müssen aus der default-server.conf raus.

Vielen Dank, das hat mein Problem gelöst.
Habe folgende zwei Directiven aus /etc/apache2/default-server.conf entfernt:
Code:
Listen 80
Listen 443
Und der Server startet wieder.
 
Das hat dir Apache auch so gesagt, wo es zu viel drin ist.
Manche globale Direktive kann man auch nicht irgendwo einfach schnell rein schreiben ohne sich über die restliche Konfiguration informiert zu haben.
Changelogs des Apache lesen ist auch nützlich, wenn da sich mal was bei den Distributionsupgrades geändert hat.
Nimm dir doch mehr Zeit.
 
Back
Top