[CentOS-de] Apache und Virtualhosts

Klaus Tachtler klaus at tachtler.net
Sa Aug 31 05:36:32 UTC 2019


Hallo Andreas,

schau mal hier unter nachfolgendem Link, in meinem DokuWiki, welches  
ich mal für mich erstellt:

https://dokuwiki.tachtler.net/doku.php?id=tachtler:apache_http_server_centos_7#virtuelle_hosts

Grüße
Klaus.

> Hallo!
>
> Ich habe mal wieder Probleme mit dem Apache und Virtualhosts.
> In der /etc/httpd/conf/httpd.conf habe ich einen IP-based Server definiert.
>
> In den Kommentaren dieser konfigurationsdatei lese ich:
>
> # 'Main' server configuration
> #
> # The directives in this section set up the values used by the 'main'
> # server, which responds to any requests that aren't handled by a
> # <VirtualHost> definition.  These values also provide defaults for
> # any <VirtualHost> containers you may define later in the file.
> #
> # All of these directives may appear inside <VirtualHost> containers,
> # in which case these default settings will be overridden for the
> # virtual host being defined.
>
> Wenn ich nun in /etc/httpd/conf.d einen namevirtualhost erstelle,  
> wird dennoch
> der Inhalt des default server aus /etc/httpd/conf/httpd.conf präseniert.
>
> Versucht habe ich vieles, alles ohne das gewünschte Ergebnis. Hinzukommt,
> dass ich gerne alle Anfragen von http nach https umleite und da habe ich
> dann das Problem, dass eine Zertifikatswarnung kommt, wenn eine Anfrage
> an den namebased virtualhost bei einem https-request den Inhalt und das
> Zertifikat des default servers präsentiert.
>
> Warum ignoriert der Apache den Virtualhost in  /etc/httpd/conf/httpd.conf
> und liefert den Inhalt des default server aus? Das macht er auch, wenn ich
> den rewrite von http nach https ausschalte.
>
> Vielliecht hat hier jemand einen Tip für mich?
>
> --
> Grüße
>
>    Andreas





-- 

--------------------------------------------
e-Mail  : klaus at tachtler.net
Homepage: https://www.tachtler.net
DokuWiki: https://dokuwiki.tachtler.net
--------------------------------------------



Mehr Informationen über die Mailingliste CentOS-de