есть много вопросов по этому поводу, но я не нахожу свою проблему. У меня есть 2 домена test1.domain.it и test2.domain.it, сконфигурированные с 4 vhost два для 80 и два для 443 на 80 vhosts, я положил перенаправление pers на ssl для каждого домена. первый домен работает с http на https, второй - на https первого. Пример:
http://test1.domain.it -> https://test1.domain.it ok
https://test1.domain.it ok
http://test2.domain.it -> https://test1.domain.it NOT OK
https://test2.domain.it ok
для перенаправления vhost я использую: test1.conf
<VirtualHost *:80>
ServerAdmin sebastian.alin@erickson.it
ServerName test1
ServerAlias test1.domain.it
Redirect permanent / https://test1.domain.it/
DocumentRoot /var/www/test1/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
test2.conf
<VirtualHost *:80>
ServerAdmin sebastian.alin@erickson.it
ServerName test2
ServerAlias test2.domain.it
Redirect permanent / https://test2.domain.it/
DocumentRoot /var/www/test2/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
, а затем ssl conf для каждого vhost.