
He construido dos vhost con apache2.4 (debian).
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>
Escribir www.hwy.local
no redireccionará https://www.hwy.local
, escribir www.test.app
redireccionará https://www.test.app
, ¿por qué?
Respuesta1
Según Michael Hampton, dice que la redirección para www.test.app no proviene del archivo de configuración de Apache, ¿hay algún archivo .htaccess en el directorio raíz de la aplicación? ¡Se podría configurar una redirección!