
Eu criei dois vhosts com 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>
A digitação www.hwy.local
não redirecionará https://www.hwy.local
, a digitação www.test.app
redirecionará https://www.test.app
, por quê?
Responder1
conforme Michael Hampton diz que o redirecionamento para www.test.app não vem do arquivo de configuração do Apache, existe algum arquivo .htaccess no diretório raiz do aplicativo? poderia ser configurado um redirecionamento!