如何为 OnlyOffice 正确设置 HTTPS [英] How to properly set up HTTPS for OnlyOffice

查看:58
本文介绍了如何为 OnlyOffice 正确设置 HTTPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照 OnlyOffice 帮助中心的说明 进行创建被浏览器声明为无效的安全证书,因为它是自签名的.

Following OnlyOffice's help center's instructions leads to the creation of security certificate declared as invalid by browsers, as it is self-signed.

其目的是在 Docker 上使用 OnlyOffice 的服务器用于 NextCloud,它已经在另一台服务器上正常运行.

The intention is to use OnlyOffice's server on Docker for NextCloud, which runs properly already on another server.

目前,证书已在说明建议的目录中创建:

Currently, the certificates have been created in the directory suggested by the instructions:

/app/onlyoffice/DocumentServer/data/certs# ls
dhparam.pem  onlyoffice.crt  onlyoffice.csr  onlyoffice.key

我已按照给定的所有步骤操作,但它不起作用.

I have followed all the given steps, and it does not work.

有没有办法使用 LetsEncrypt 代替自签名证书?

Is there a way to use LetsEncrypt instead of self-signed certificates?

我不是 IT 管理人员,我是一个简单的开发人员,试图使用 OSS 不使用 Google Docs 等.在提供指导时考虑到这一点,因为你可能认为理所当然,我可能不会.

I am not an IT management person, I am a simple developer trying to use OSS to not use Google Docs etc. Take this into consideration when providing guidance, as what you may take for granted, I may not.

推荐答案

您遇到的问题是自签名证书不受任何人(任何东西)的信任.

The problem that you are having is that a self-signed certificate is not trusted by anyone (anything).

您可以使用 Let's Encrypt 创建自己的证书.您将需要在您的服务器上创建一个特殊文件,或者在您的域的 DNS 服务器上创建一个 TXT 记录.

You can create your own certificate using Let's Encrypt. You will either need to create a special file on your server or create a TXT record on your domain's DNS server.

Certbot 下载

以下内容适用于 Linux.如果您在 Windows 上运行,请尝试使用 ManuaLE(更多信息见下文)

The following is for Linux. If you are running on Windows, try using ManuaLE (more info below)

去让我们加密和下载 certbot.然后从命令行:

Go to let's encrypt and download certbot. Then from the command line:

certbot certonly --manual --preferred-challenges dns -d mydomain.com

此命令将提示您在 DNS 服务器上创建 TXT 记录.创建记录后等待几分钟,然后按 ENTER 继续.

This command will prompt you to create a TXT record on your DNS server. After creating the record wait a few minutes before pressing ENTER to continue.

创建 SSL 证书后,将其复制并重命名到问题中列出的所需位置.

After your SSL certificate is created, copy and rename them to your desired location listed in your question.

ManuaLE for Windows 的说明.

ManuaLE 下载

manuale authorize mydomain.com
manuale issue mydomain.com

创建 SSL 证书后,将其复制并重命名到问题中列出的所需位置.

After your SSL certificate is created, copy and rename them to your desired location listed in your question.

这篇关于如何为 OnlyOffice 正确设置 HTTPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆