Apache2: Warnmeldung beim Reload

Apache, Lighttpd, nginx, Cherokee
Post Reply
volle
Posts: 42
Joined: 2003-09-17 19:00
Location: Asselfingen
Contact:
 

Apache2: Warnmeldung beim Reload

Post by volle »

Hallo,

wenn ich auf meinem Rootserver (SuSE 9.0) den Apache2 reloaden will erscheinen folgenden Meldungen:

Code: Select all

pxxxxxxxx:~ # rcapache2 restart
[Fri Jun 11 17:31:08 2004] [warn] NameVirtualHost 217.160.xxx.xxx:80 has no VirtualHosts
Syntax OK
Shutting down httpd2 (waiting for all children to terminate)         done
Starting httpd2 (prefork) [Fri Jun 11 17:31:13 2004] [warn] NameVirtualHost 217.160.xx.xxx:80 has no VirtualHosts
                                                                     done
Wo könnte hier der Fehler liegen?

Volle
wirsing
Posts: 604
Joined: 2002-11-20 21:32
Location: Vaihingen und Karlsruhe
 

Re: Apache2: Warnmeldung beim Reload

Post by wirsing »

Erstens: Dein Apache ist in seiner Funktion nicht behindert.
Zweitens: Du hast eine IP-Adresse bei NameVirtualHost eingetragen, aber keinen VirtualHost-Abschnitt mit dieser IP-Adresse definiert. Mögliche Ursache: Du hast mehrere IP-Adressen, und diese eine ist mit keinem VirtualHost verbunden.
http://httpd.apache.org/docs-2.0/vhosts/name-based.html
volle
Posts: 42
Joined: 2003-09-17 19:00
Location: Asselfingen
Contact:
 

Re: Apache2: Warnmeldung beim Reload

Post by volle »

Hallo,

hab nun mal in den conf Dateien geschaut was dort steht:

- in der confixx_mhost.conf gibt es 2 VirtualHost-Abschnitte
- in der confixx_vhost.conf gibt es ca. 40 dieser Abschnitte (denke für jede angelegte Domain eine)

IP Adressen habe ich nur eine, Apache läuft auch soweit.

Volle
wirsing
Posts: 604
Joined: 2002-11-20 21:32
Location: Vaihingen und Karlsruhe
 

Re: Apache2: Warnmeldung beim Reload

Post by wirsing »

Werden diese Dateien in die httpd.conf includet? Wie sieht so ein VirtualHost-Abschnitt aus (zumindest der Kopf)? Was hast du an NameVirtualHost-Abschnitten?
Lass dir doch nicht alles aus der Nase ziehen.
volle
Posts: 42
Joined: 2003-09-17 19:00
Location: Asselfingen
Contact:
 

Re: Apache2: Warnmeldung beim Reload

Post by volle »

Hier zunächste alle Dateien in der httpd.conf included werden:

Code: Select all

Include /etc/apache2/uid.conf
Include /etc/apache2/server-tuning.conf
Include /etc/apache2/sysconfig.d/loadmodule.conf
Include /etc/apache2/listen.conf
Include /etc/apache2/sysconfig.d/global.conf
Include /etc/apache2/mod_status.conf
Include /etc/apache2/mod_info.conf
Include /etc/apache2/mod_autoindex-defaults.conf
Include /etc/apache2/mod_mime-defaults.conf
Include /etc/apache2/errors.conf
Include /etc/apache2/ssl-global.conf
Include /etc/apache2/default-server.conf
Include /etc/apache2/sysconfig.d/include.conf
Include /etc/apache2/vhosts.d/*.conf
Include /etc/apache2/confixx_mhost.conf
Am ende der confixx_mhost.conf wird dann noch folgendes Included:

Code: Select all

Include /etc/apache2/confixx_vhost.conf
Auszug von NameVirtualHost-Abschnitten und VirtualHost-Abschnitten aus confixx_mhost.conf:

Code: Select all

NameVirtualHost 217.160.xxx.xxx:80

<VirtualHost 217.160.xxx.xxx:80>
        ServerName confixx.pxxxxxxxx.pureserver.info
        ServerAlias pxxxxxxxx.pureserver.info

        #User confixx
        #Group confixx
        DocumentRoot /srv/www/confixx/html
        Options FollowSymLinks

                php_admin_value safe_mode Off
                php_flag magic_quotes_gpc Off
                php_admin_flag file_uploads On

        php_admin_value track_vars On
        php_admin_value upload_tmp_dir /srv/www/confixx/tmp
        php_admin_value include_path ".:/srv/www/confixx/html/include:/srv/www/c
onfixx/html"

        ScriptAlias /cgi-bin/ /srv/www/confixx/html/cgi-bin/

        CustomLog /var/log/apache2/confixx.pxxxxxxxx.pureserver.info_access.log
"%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i""
        ErrorLog /var/log/apache2/confixx.pxxxxxxxx.pureserver.info_error.log

</VirtualHost>

NameVirtualHost 217.160.xxx.xxx:443
<VirtualHost 217.160.xxx.xxx:443>
        ServerName confixx.pxxxxxxxx.pureserver.info
        ServerAlias pxxxxxxxx.pureserver.info

        #User confixx
        #Group confixx
        DocumentRoot /srv/www/confixx/html
        Options FollowSymLinks

                php_admin_value safe_mode Off
                php_flag magic_quotes_gpc Off
                php_admin_flag file_uploads On

        php_admin_value track_vars On
        php_admin_value upload_tmp_dir /srv/www/confixx/tmp
        php_admin_value include_path ".:/srv/www/confixx/html/include:/srv/www/c
onfixx/html"

        SSLEngine on
        SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
:+eNULL
        SSLCertificateFile /etc/apache2/ssl.crt/confixx.pxxxxxxxx.pureserver.inf
o.crt
        SSLCertificateKeyFile /etc/apache2/ssl.key/confixx.pxxxxxxxx.pureserver.
info.key

        SetEnvIf User-Agent ".*MSIE.*" 
                nokeepalive ssl-unclean-shutdown 
                downgrade-1.0 force-response-1.0

        <Files ~ ".(cgi|shtml|phtml|php3?)$">
                SSLOptions +StdEnvVars
        </Files>
        <Directory "/srv/www/confixx/html/cgi-bin">
                SSLOptions +StdEnvVars
        </Directory>

        ScriptAlias /cgi-bin/ /srv/www/confixx/html/cgi-bin/

        CustomLog /var/log/apache2/confixx.pxxxxxxxx.pureserver.info_access.log
"%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i""
        ErrorLog /var/log/apache2/confixx.pxxxxxxxx.pureserver.info_error.log

</VirtualHost>
Auszug von NameVirtualHost-Abschnitten und VirtualHost-Abschnitten aus confixx_vhost.conf:

Code: Select all

NameVirtualHost 217.160.xxx.xxx:80
<VirtualHost 217.160.xxx.xxx:80>
  DocumentRoot /srv/www/confixx/html/gesperrt
</VirtualHost>

<VirtualHost 217.160.xxx.xxx:80>
  ServerName web0.pxxxxxxxx.pureserver.info
  ServerAlias www.pxxxxxxxx.info pxxxxxxxx.info
  DocumentRoot /srv/www/confixx/html/gesperrt
  ErrorDocument 404 /
</VirtualHost>

<VirtualHost 217.160.xxx.xxx:80>
  ServerName www.domain1.de
  ServerAlias domain1.de web1.pxxxxxxxx.pureserver.info
  DocumentRoot /home/htdocs/web1/html
  SuexecUserGroup web1 ftponly
  ScriptAlias /cgi-bin/ /home/htdocs/web1/html/cgi-bin/
  CustomLog /home/htdocs/web1/log/access_log confixx2
  php_admin_value open_basedir /home/htdocs/web1/
  php_admin_flag safe_mode On
  php_admin_value safe_mode_exec_dir /home/htdocs/web1/
  php_admin_value file_uploads 1
  php_admin_value upload_tmp_dir /home/htdocs/web1/phptmp/
</VirtualHost>
Dieser letzte Abschnitt scheint sich dann für jede Domain zu wiederholen.

Volle
wirsing
Posts: 604
Joined: 2002-11-20 21:32
Location: Vaihingen und Karlsruhe
 

Re: Apache2: Warnmeldung beim Reload

Post by wirsing »

Perfekt! Du hast die wichtigsten Informationen erfolgreich zensiert.
volle
Posts: 42
Joined: 2003-09-17 19:00
Location: Asselfingen
Contact:
 

Re: Apache2: Warnmeldung beim Reload

Post by volle »

host = p15142404
ip = 217.160.201.111
domain = bihrle.de


Sorry, dachte das wäre unrelevant.

Volle
wirsing
Posts: 604
Joined: 2002-11-20 21:32
Location: Vaihingen und Karlsruhe
 

Re: Apache2: Warnmeldung beim Reload

Post by wirsing »

Mein Gedanke war der, dass möglicherweise die NameVirtualHost-IP und die <VirtualHost >-IPs nicht dieselben sind. Möglicherweise könnte es auch daran liegen, dass hier zwei NameVirtualHost-Direktiven eingetragen sind. Probier doch mal, eine auszukommentieren.
Outlaw
Posts: 1500
Joined: 2002-12-04 10:22
Location: 4. Server von rechts, 2. Reihe von oben
 

Re: Apache2: Warnmeldung beim Reload

Post by Outlaw »

Volle wrote:Hallo,

hab nun mal in den conf Dateien geschaut was dort steht:

- in der confixx_mhost.conf gibt es 2 VirtualHost-Abschnitte
- in der confixx_vhost.conf gibt es ca. 40 dieser Abschnitte (denke für jede angelegte Domain eine)

IP Adressen habe ich nur eine, Apache läuft auch soweit.

Volle
Es kommt nicht darauf an, wie viele VirtualHost Abschnitte Du hast, sondern was auf den Eintrag "NameVirtualHost" folgt. Wenn nach einem Eintrag kein Virtualhost folgt, erscheint diese Fehlermeldung. Die hatte ich letztens, als ich Confixx von Version 2 auf 3 upgedated hatte. Es gab eine neue Confixx Konf, bei der der Namevirtualhost erneut definiert wurde aber in der alten Version nicht gelöscht wurde.

Schau Dir mal am besten die 3 Dateien an:

httpd.conf
confixx_vhost.conf
confixx_mhost.conf

Und such mal nach NameVirtualHost und wenn bei eirgendeiner Fundstelle kein VirtualHost folgt, mach mal testhalber vor den Eintrag NameVirtualHost ein # (also auskommentieren) und dann reloade den Apachen und sach uns, obs geholfen hat.

Gruß Outi
volle
Posts: 42
Joined: 2003-09-17 19:00
Location: Asselfingen
Contact:
 

Re: Apache2: Warnmeldung beim Reload

Post by volle »

Hallo,

hab nun in der confixx_vhost.conf den ersten Eintrag mit NameVirtualHost auskommentiert, und siehe da - es funktioniert!

Nun stellt sich nur noch die Frage, wie ich das dauerhaft ändern kann. Bei der Anlage oder Ã?nderung an den Domains wird die Datei ja neu erstellt.

Volle
Outlaw
Posts: 1500
Joined: 2002-12-04 10:22
Location: 4. Server von rechts, 2. Reihe von oben
 

Re: Apache2: Warnmeldung beim Reload

Post by Outlaw »

Das verm. Schnellste wäre, die DB zu bearbeiten. Ich hatte Glück, da sich mein "leerer" Eintrag in der httpd.conf befand und da hält sich Confixx weitgehendst raus.

Gruß Outi
wirsing
Posts: 604
Joined: 2002-11-20 21:32
Location: Vaihingen und Karlsruhe
 

Re: Apache2: Warnmeldung beim Reload

Post by wirsing »

Dann nimm es doch mal aus der confixx_mhost raus und mach es wieder in die confixx_vhost rein. Die Reihenfolge dürfte keine Rolle spielen.
Outlaw
Posts: 1500
Joined: 2002-12-04 10:22
Location: 4. Server von rechts, 2. Reihe von oben
 

Re: Apache2: Warnmeldung beim Reload

Post by Outlaw »

Das nicht, wie er aber schon richtig geschrieben hat, dürfte sich das nach der nächsten Domain bereits wieder erledigt haben oder lässt Confixx inzwischen die vhost Datei in Ruhe ??

Gruß Outi
volle
Posts: 42
Joined: 2003-09-17 19:00
Location: Asselfingen
Contact:
 

Re: Apache2: Warnmeldung beim Reload

Post by volle »

Hallo,

ich hab nun in der mhost die Zeile auskommentiert, scheint soweit zu funktionieren, neue Domains werden in der vhost angelegt und sind auch erreichbar.

Aber das scheint ein generelles Problem von Confixx zu sein oder?

Volle
Post Reply