新建 web server (Win2008 Standard Server) 給 SSL websites 專用,SSL 採用自製 (Self-Signed Certificate)。
在建立第二個 websites 時出現問題, 說是同一個 port 不可以給兩個 websites 共用。
當然,沒有分別設定 HTTP HEADER。
可是 IIS 的 Management Console 沒法 edit 個別 website 的 HTTP HEADER 資料啊?
原來 IIS 7 的 Management Console 未有改善這個功能,說是 IIS7.5 就可以了,又係 Microsoft 的討厭手段。
要用 appcmd 了,啟動 cmd,轉移至 C:WindowsSystem32inetsrv,輸入以下的指令:
appcmd set site /site.name:"你的 website 名" /+bindings.[protocol='https',bindingInformation='*:443:你要用的 HTTP HEADER 名']
參考資料:
- 這是 Microsoft 的說明
- 這裡是網友的說明 (比較清楚)