使用低版本的IIS6或7時(shí),安裝pfx格式的SSL證書(shū)會(huì)顯示主機(jī)名無(wú)法編輯,如下圖。
造成的原因:Windows Server 2008不支持該操作,需要修改對(duì)應(yīng)文件?;蛘呱?jí)服務(wù)器版本。
1. 請(qǐng)按路徑 C:\Windows\system32\inetsrv\config\applicationHost.config 打開(kāi)applicationHost.config 文件。
2. 修改內(nèi)容如下:
說(shuō)明以 “www.sz-lawfirm.com”域名為例,
<site name="www.sz-lawfirm.com" id="8">
<application path="/">
<virtualDirectory path="/" physicalPath="D:\web\22net" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:www.sz-lawfirm.com" />
<binding protocol="http" bindingInformation="*:80:22.cn" />
<binding protocol="https" bindingInformation="*:443:" />
</bindings>
</site>
將 <binding protocol="https" bindingInformation="*:443:" />
修改為<binding protocol="https" bindingInformation="*:443:www.sz-lawfirm.com" />。
文件無(wú)法直接修改時(shí),可以嘗試使用管理員權(quán)限進(jìn)行修改或復(fù)制文件到桌面修改后,進(jìn)行替換。
3. 文件保存后,重新添加網(wǎng)站綁定即可。