gpt4 book ai didi

ssl - 瓦坎达和 SSL : Server Name and how to gracefully handle HTTP requests?

转载 作者:太空宇宙 更新时间:2023-11-03 13:11:58 25 4
gpt4 key购买 nike

我正在运行 Wakanda Enterprise Studio/Server v10,并且 the documentation用于设置 SSL 显示了使用以下命令生成私钥和证书签名请求:

openssl req -new -nodes -newkey rsa:2048 -keyout myServer.key -out myServer.csr

文档说要为 myServer 使用我的服务器名称 - 那是域名吗?

其次,我想优雅地处理 HTTP 请求。你能为此提出一个策略吗?最好通过将请求重定向到 https://example.com 来处理对 http://example.com 的任何请求,这样升级对我们的用户来说是透明的.

我想到了使用我的请求处理程序(现在只用于记录 IP)来重定向。我还不确定我将如何编写代码,但如果这听起来是个好策略,那么我将寻求该解决方案。

最佳答案

documentation 的下方它说文件应该命名为 cert.pemkey.pem

If you want to use the SSL/TLS protocol in your Wakanda application, the following files must be installed:
* key.pem: This file contains the private key.
If necessary, rename your private key file name manually to "key.pem".
* cert.pem: This file contains the certificate.
It must be named "cert.pem" and be in PKCS format. If you get a file in a different format, you must convert it into .pem format (see above).


需要路径、自签名或官方证书颁发机构的 CSR。

发出 openssl req -new -nodes -newkey rsa:2048 -keyout myServer.key -out myServer.csr 命令后,您将收到来自 OpenSSL 的大量问题将用于 CSR,其中一个问题是服务器名称:

enter image description here

关于ssl - 瓦坎达和 SSL : Server Name and how to gracefully handle HTTP requests?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36634266/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com