我们最近刚刚购买了一台专用服务器,带有公共ip地址。我有一个域的经认证的ssl证书,我将使用example.com作为示例。此域具有专用ip。当我试图发布一个网站时,我会使用:
https://example.com:8172/msdeploy.axd
我收到这样的信息:

我将管理服务设置为:

我不能在这里更改SSL证书以匹配域mydomain.com,它只给了我一个选项WMSVC-SHA2。域上的ip与管理服务上的ip匹配。我也可以去网站,它显示证书是有效的。
如何让Management使用我们购买的mydomain.com甚至认证证书,以便它使用正确的证书?
发布于 2022-09-06 17:38:09
可以使用PowerShell将IIS管理服务配置为使用自定义证书。你可以参考我关于这个主题的博客文章:配置IIS管理以使用集中式SSL证书。
下面是一个PowerShell函数:
function Configure-WebAdministrationCertificate {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[Security.Cryptography.X509Certificates.X509Certificate2]$Certificate
)
if (!(Test-Path "HKLM:\SOFTWARE\Microsoft\WebManagement\Server")) {
[void](New-Item -Path "HKLM:\SOFTWARE\Microsoft\WebManagement\" -Name "Server" -Force -ErrorAction Stop)
}
$Tokens = $Certificate.Thumbprint -split "([a-fA-F0-9]{2})" | ? {$_}
[Byte[]]$Bytes = $Tokens | %{[Convert]::ToByte($_,16)}
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WebManagement\Server -Name SslCertificateHash -Value $Bytes
Import-Module WebAdministration
del IIS:\SslBindings\0.0.0.0!8172
$Certificate | New-Item -Path IIS:\SslBindings\0.0.0.0!8172 -Force
Restart-Service -Name wmsvc
}并使用它:
$cert = gi cert:\LocalMachine\My\$Thumbprint
Configure-WebAdministrationCertificate $cert其中$Thumbprint变量存储证书的拇指打印值。
https://serverfault.com/questions/1110095
复制相似问题