我有一個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