Apache/Nginx 作为代理服务器?

尊敬的 Discourse 社区。我有一个问题,希望你们能帮助我。

我想在 专用 的 Ubuntu 虚拟机(Oracle VirtualBox)上安装 Discourse。例如:192.168.6.15。
我的本地网络上已经运行了 Apache2 和 Nginx 服务器。

我能否使用类似以下的代理:

(Apache 示例)

<VirtualHost x.x.x.x:443>
ServerName forum.example.org
RewriteEngine On

SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/forum.example.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/forum.example.org/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf

ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://192.168.6.15:4578/
ProxyPassReverse / http://192.168.6.15:4578/

</VirtualHost>

这样可以吗?
这是好的做法吗?
我猜 Let’s Encrypt 应该放在代理服务器上处理 SSL?

是的

大多数时候,不是。

我们已经在容器中装载了 nginx,并且我们保持其配置并更新了对 brotli、http/2、非缓冲代理、正确处理客户端 IP 等功能的支持。

如果您在中间添加新的代理,那么您将负责不破坏所有这些功能。

3 个赞
  • 这是用于生产环境的安装,还是用于开发的安装?
  • 它会是本地虚拟机吗?
  • 你能给它在 DNS 中命名吗?
1 个赞

感谢您的回复。

我遵循了指南中的步骤并进行了安装。

1 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.