Re: apache2 hört per SSL auf alle Hostnamen

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Daniel Laczi
Date:  
To: Norman Zimmer, LUSC Liste
Subject: Re: apache2 hört per SSL auf alle Hostnamen
Hi,

wie Sven schon geschrieben hat: der erste definierte VirtualHost mit
Port 443 nimmt alle Anfragen für Port 443 an. Dabei ist es egal, welche
Namen er hat.

Am 04.06.19 um 08:42 schrieb Norman Zimmer:
> Hallo Liste,
>
> mein Webserver hat ein paar http-Seiten und eine https-Seite gehostet.
> Leider hört die Kiste per https auf alle Hostnamen, dass sollte nicht
> sein. (Die https-Seite läuft als Joomla, sollte aber keinen Unterschied
> machen?)
>
>
> Es gibt z.B. die Seite:
> https://www.https.de/foo
>
> Ein Aufruf von
> http://www.http.de/foo
> bringt richtigerweise einen "not-found"
>
> Ein Aufruf von
> https://www.http.de/foo
> bringt fälschlicherweise den Inhalt von "https://www.https.de/foo"

www.http.de. ist ein FQDN deines Webserver. Irgend ein VirtualHost für
Port 443, vermutlich der erste, nimmt die Anfrage an und /foo ist auf
deinem Webserver vorhanden. Also erst einmal alles korrekt. Gegenfrage:
was würdest du denn "richtigerweise" erwarten? Einen Redirect? Keine
Antwort?
> Ich hab schon viel gesucht, hab aber keine Ahnung was ich flasch
> mache. Unten ein paar Infos und einen Teil der Config.
>
> Any Ideas?
>
> LG Norman
>
>
>
> apache2ctl -v
> Server version: Apache/2.4.25 (Debian)
>
>
> ### cat /etc/apache2/ports.conf
> Listen 80
> Listen 443
> NameVirtualHost *:80
> NameVirtualHost *:443
>
> ### cat /etc/apache2/sites-enabled/002-http.de.conf
> <VirtualHost *:80>
> ServerAdmin webmaster@???
> ServerName www.http.de
>
> DocumentRoot /home/www-root/http.de
> <Directory /home/www-root/http.de>
> Options FollowSymLinks MultiViews
> AllowOverride FileInfo Options
> Require all granted
> </Directory>
> </VirtualHost>
>
> <VirtualHost *:80>
> ServerName http.de
> Redirect / http://www.http.de
> </VirtualHost>
>
> ### cat /etc/apache2/sites-enabled/001-http-redir-to-https.conf
> <VirtualHost *:80>
> ServerName https.de
> Redirect / https://www.https.de/
> </VirtualHost>
> <VirtualHost *:80>
> ServerName www.https.de
> Redirect / https://www.https.de/
> </VirtualHost>
>
> ### cat /etc/apache2/sites-enabled/000-https.conf
> <VirtualHost *:443>
> ServerAdmin webmaster@???
> ServerName www.https.de
>
> SSLEngine On
> SSLCertificateKeyFile ssl/www.https.de.key
> SSLCertificateFile ssl/www.https.de.crt
> SSLCertificateChainFile ssl/rootca.crt
>
> SSLProtocol -all +TLSv1.2 +TLSv1.1 +TLSv1
> SSLHonorCipherOrder on
> SSLCipherSuite
> ### schnippp - weitere Infos bitte anfragen ###
>

Gruß

Daniel

-- 
Mailing-Liste der Linux User Schwabach (LUSC) e.V.
Vor und beim Posten bitte
        => http://lusc.de/List-Netiquette <=    und
        => http://lusc.de/List-Howto      <=    beachten. Danke!