简体   繁体   English

NGINX 为 Nextcloud 加密所有数据的反向代理

[英]NGINX Reverse Proxy that encrypts all Data for Nextcloud

I have a Nextcloud (Port 8080) Docker Container running and I want to encrypt the datastream with ssl.我有一个 Nextcloud(端口 8080)Docker 容器正在运行,我想用 ssl 加密数据流。

So I found out that I can do things like that with nginx (reverse Proxy with SSL), but I couldn't find a way how...所以我发现我可以用 nginx(带 SSL 的反向代理)来做类似的事情,但我找不到如何...

I already have a Key and Private Key Certificate on my pi generated by lets encrypt lying around, so basically if you connect to my Domain with http/80 it should redirect the data to the proxy and the proxy should "proxy" all data through to localhost:8080 .我的 pi 上已经有一个由 Let encrypt 生成的密钥和私钥证书,所以基本上如果您使用 http/80 连接到我的域,它应该将数据重定向到代理,并且代理应该将所有数据“代理”到localhost:8080

And I should add, yes, I tried the official way for this (with the nginx reverse proxy docker and the lets encrypt companion) but it doesn't work bc I'm doing it on a pi (arm).我应该补充一下,是的,我为此尝试了官方方法(使用 nginx 反向代理 docker 和让加密伴侣),但它不起作用,因为我在 pi(arm)上做。

Easiest way is to use a popular Nginx container by the awesome Linuxserver guys, named "Swag" (it does have an ARM version as well).最简单的方法是使用由出色的 Linuxserver 人员开发的流行的 Nginx 容器,名为“Swag”(它也有 ARM 版本)。

https://hub.docker.com/r/linuxserver/swag https://hub.docker.com/r/linuxserver/swag

They even have a pre-configured Nextcloud proxy config setup for you, all you have to do is rename the file, removing .sample from the end of it.他们甚至为您预先配置了 Nextcloud 代理配置设置,您所要做的就是重命名文件,从文件末尾删除.sample

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM