首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu18服务器结合rocketchat和nextcloud的snap安装

问Ubuntu18服务器结合rocketchat和nextcloud的snap安装
EN

Ask Ubuntu用户
提问于 2018-12-21 16:48:10
回答 1查看 988关注 0票数 0

我安装了一个新的Ubuntu18服务器,通过snap安装了Nextcloud和Rocketchat。

在启用了letsencrypt之后,Nextcloud监听端口443,Rocketchat在端口3000上。

我希望两人都能根据域名监听端口443,而不必处理他们的证书。(https://rocketchat.example.com:443和https://nextcloud.example.com:443)。

当我搜索时,我似乎应该安装apache或nginx并执行代理服务器。但所有的事情都是直接处理证书,我想避免。有可能吗?

EN

回答 1

Ask Ubuntu用户

发布于 2018-12-21 18:01:54

这个问题给了我如何做的提示,然后我看到了apache的以下配置文件:

nextcloud.conf:

代码语言:javascript
复制
LoadModule ssl_module modules/mod_ssl.so



        ServerName nextcloud.example.com

        SSLProxyEngine On
        SSLProxyVerify none
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off
        SSLProxyCheckPeerExpire off

        SSLCertificateFile /var/snap/nextcloud/current/certs/live/fullchain.pem
        SSLCertificateKeyFile /var/snap/nextcloud/current/certs/live/privkey.pem

        Proxypass / https://localhost:44300/
        ProxypassReverse / https://localhost:44300/

rocketchat.conf:

代码语言:javascript
复制
        ServerName rocketchat.example.com

        SSLCertificateFile /etc/letsencrypt/live/chat.ljp.upmc.fr/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/chat.ljp.upmc.fr/privkey.pem

        
                Order allow,deny
                Allow from all
        

        RewriteEngine On
        RewriteCond %{HTTP:Upgrade} =websocket [NC]
        RewriteRule /(.*)           ws://localhost:3000/$1 [P,L]
        RewriteCond %{HTTP:Upgrade} !=websocket [NC]
        RewriteRule /(.*)           http://localhost:3000/$1 [P,L]

        ProxyPassReverse / http://localhost:3000/
票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1103635

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档