我有一个Apache的设备存在问题,将不匹配从客户端访问的服务器名称,造成了警告:设置Apache的虚拟主机,表示正常SNI握手
TLSv1.2工作记录层:警报(级别:警告,描述:无法识别的名称)
我非常确定这与我的VirtualHost配置有关。尽管我已经为所有主机设置了ServerName和ServerAlias,但服务器并没有发回服务器名称。
这里是我的Apache配置:
<VirtualHost *:80>
ServerName example.io
ServerAlias example.io
Redirect permanent/https://example.io
</VirtualHost>
<VirtualHost *:80>
ServerName api.example.io
ServerAlias api.example.io
Redirect permanent/https://api.example.io
</VirtualHost>
<VirtualHost *:80>
ServerName store.example.io
ServerAlias store.example.io
Redirect permanent/https://store.example.io
</VirtualHost>
<VirtualHost *:443>
ServerName example.io
ServerAlias example.io
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /path/file.crt
SSLCertificateKeyFile /path/file.key
SSLCertificateChainFile /path/file.crt
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
任何帮助,将不胜感激!
“我的Apache机器出现问题,不会返回服务器名称,这会导致某些实施SNI的客户端返回错误。” - 这对我来说没有意义。客户端发送它期望在ClientHello中的服务器名称。服务器没有返回服务器名称。 – 2015-02-24 17:36:06
你说得对,我误解了这一点。客户端发送它期望的服务器名称,但它不匹配,Apache发回警告。我会更新我的问题。 – Stromgren 2015-02-24 17:37:53
您只配置了一个证书。此证书已发送。如果证书的内容与期望的名称不符,客户会抱怨。对于SNI,您需要多个证书。或者您拥有多个名称的证书,在这种情况下您甚至不需要SNI。 – 2015-02-24 17:39:34