与SSL和非SSL域的VirtualHost相匹配的问题

我有5个域的设置。 他们在<VirtualHost *:80>有非SSL的logging。 他们每个人都有自己的logging下前。

 <VirtualHost 172.30.0.245:443> ServerName www.acme.com ServerAlias acme.com 

,因为他们有不同的IP和SSL证书。 这工作正常。

我还有一个通用logging<VirtualHost *:80> ,它位于文件001-vhosts.conf中。 它捕获的stream量不是我的域名。 如果它与我的某些域不匹配,则返回410.这也可以正常工作。 如果我将http://test.com指向服务器的IP,它将转到通用logging并返回410。

问题是我为SSL <VirtualHost *:443>添加通用logging。 如果我打开https://test.com它匹配<VirtualHost 172.30.0.245:443>而不是通用logging。 我希望stream量是不是我的域名返回410,无论是http或https。 我使用AWS,通常有这样的stream量。

我错过了什么?

我有5个域的设置。 他们在<VirtualHost *:80>有非SSL的logging。 他们每个人都有自己的logging下前。

 <VirtualHost 172.30.0.245:443> ServerName www.acme.com ServerAlias acme.com 

,因为他们有不同的IP和SSL证书。 这工作正常。

我还有一个通用logging<VirtualHost *:80> ,它位于文件001-vhosts.conf中。 它捕获的stream量不是我的域名。 如果它与我的某些域不匹配,则返回410.这也可以正常工作。 如果我将http://test.com指向服务器的IP,它将转到通用logging并返回410。

问题是我为SSL <VirtualHost *:443>添加通用logging。 如果我打开https://test.com它匹配<VirtualHost 172.30.0.245:443>而不是通用logging。 我希望stream量是不是我的域名返回410,无论是http或https。 我使用AWS,通常有这样的stream量。

我错过了什么?

命令sudo apache2ctl -S返回:

 VirtualHost configuration: 172.30.0.160:443 www.ssl-domain1.com (/etc/apache2/sites-enabled/ssl-domain1.conf:121) 172.30.0.139:443 www.ssl-domain2.com (/etc/apache2/sites-enabled/ssl-domain2.conf:12) 172.30.0.137:443 www.ssl-domain3.com (/etc/apache2/sites-enabled/ssl-domain3.conf:7) 172.30.0.245:443 www.ssl-domain4.com (/etc/apache2/sites-enabled/ssl-domain4.conf:39) 172.30.0.124:443 www.ssl-domain5.com (/etc/apache2/sites-enabled/ssl-domain5.conf:80) *:443 ip-172-30-0-73.eu-west-1.compute.internal (/etc/apache2/sites-enabled/001-vhosts.conf:17) *:80 is a NameVirtualHost default server ip-172-30-0-73.eu-west-1.compute.internal (/etc/apache2/sites-enabled/001-vhosts.conf:3) port 80 namevhost ip-172-30-0-73.eu-west-1.compute.internal (/etc/apache2/sites-enabled/001-vhosts.conf:3) port 80 namevhost acme1.com (/etc/apache2/sites-enabled/acme1.com.conf:4) port 80 namevhost acme2.com (/etc/apache2/sites-enabled/acme2.com.conf:3) alias www.acme2.com alias staging.acme2.com