Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何为 dp2mserver 启用 https #256

Open
DigitalPlatform opened this issue Jun 24, 2021 · 0 comments
Open

如何为 dp2mserver 启用 https #256

DigitalPlatform opened this issue Jun 24, 2021 · 0 comments

Comments

@DigitalPlatform
Copy link
Owner

DigitalPlatform commented Jun 24, 2021

为 dp2mserver 启用 https 的步骤:

  1. 查看即将使用的、已经安装到服务器本机的 My 存储位置的那个数字证书的指纹(thumbprint 或 certhash)。
    一般为这样的形态:
    872801bbd93e75f327b34ae76366fa05b229433b
    把它复制粘贴到一个记事本窗口中。注意如果中间有多余的空格,要去除掉

  2. 查看 dp2mserver 的监听 URL,了解监听端口号。
    方法是用 Administrator 身份启动一个 Windows 命令提示符,然后在里面执行 dp2mserver setting。如果只是查看当前配置参数,对每一个提问都回车即可,这样就不会修改配置参数。
    一般服务器的 URI 为:
    http://*:8083
    8083 就是端口号,记下这个端口号。

  3. 为指定端口绑定数字证书。
    在 Administrator 身份的 Windows 命令提示符中执行如下命令:

netsh http add sslcert ipport=0.0.0.0:8083 certhash=872801bbd93e75f327b34ae76366fa05b229433b appid={ca84fb79-db4f-4e06-b833-1603913c091e}

注意其中 centhash 是证书的指纹,这里是随便举例的,其值要根据刚才第一步查得的实际值替换。
另外注意 ipport 参数里的 8083,要根据实际情况决定。

  1. 为 dp2mserver 重设监听 URL。
    用 Administrator 身份启动一个 Windows 命令提示符,然后在里面执行 dp2mserver setting。
    在询问“服务器 URI”是,输入:
    https://*:8083
    注意 https 多了一个 s。实际上就是把原有的 URI 的开头从 http 改为 https,注意这的端口号只是举例,要以实际看到的为准,不用改变原有的端口号。

  2. 用 Windows “服务”或者 chordInstaller 重启 dp2mserver service。然后用一个前端来验证新的 https:// ... 地址是否可用了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant