
Ich habe zwei virtuelle Hosts mit Apache2.4 (Debian) aufgebaut.
cat /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
ServerName www.hwy.local
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error_hwy.log
CustomLog ${APACHE_LOG_DIR}/access_hwy.log combined
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.test.app
ServerAdmin webmaster@localhost
DocumentRoot /home/debian9/app
ErrorLog ${APACHE_LOG_DIR}/error_hwy.log
CustomLog ${APACHE_LOG_DIR}/access_hwy.log combined
<Directory /home/debian9/app>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
Beim Eintippen www.hwy.local
erfolgt keine Umleitung https://www.hwy.local
. Beim Eintippen www.test.app
erfolgt eine Umleitung https://www.test.app
, warum?
Antwort1
Laut Michael Hampton stammt die Umleitung für www.test.app nicht aus der Apache-Konfigurationsdatei. Gibt es im Stammverzeichnis der App eine .htaccess-Datei? Dort könnte eine Umleitung konfiguriert sein!