我安装了一个新的Ubuntu18服务器,通过snap安装了Nextcloud和Rocketchat。
在启用了letsencrypt之后,Nextcloud监听端口443,Rocketchat在端口3000上。
我希望两人都能根据域名监听端口443,而不必处理他们的证书。(https://rocketchat.example.com:443和https://nextcloud.example.com:443)。
当我搜索时,我似乎应该安装apache或nginx并执行代理服务器。但所有的事情都是直接处理证书,我想避免。有可能吗?
发布于 2018-12-21 18:01:54
这个问题给了我如何做的提示,然后我看到了apache的以下配置文件:
nextcloud.conf:
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:
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/https://askubuntu.com/questions/1103635
复制相似问题