Realt对象服务器的Https代理服务器不工作

问题描述:

我似乎无法获得运行我的Realm对象服务器的https代理服务器。我遵循的文档,其中包括编辑configuration.yml文件每一步改变:Realt对象服务器的Https代理服务器不工作

proxy.https.enable: true 
proxy.https.listen_address: :: 
proxy.https.listen_port: 9443 
proxy.https.certificate_path: 'cert_path' 
proxy.https.private_key_path: 'private_key_path' 

当我访问http://example.com:9080它的罚款,但来访的https://example.com:9443不工作 - 我验证过的路径正确,并且证书/私钥组合是有效的。

任何帮助配置这将是非常赞赏,因为我试图让应用程序符合Apple的ATS要求!

+0

您是如何获得SSL证书的? –

+0

@IanBradbury我使用Comodo,看起来我们有我们的答案,但有权限! –

Realm对象服务器由“realm”用户启动,您应该检查用户是否有权访问证书。

以下是设置https的指令列表letsencrypt!在Ubuntu 16.04,也许它可以帮助找出问题:

  1. 安装ROS,letsencrypt并生成证书

curl -s https://packagecloud.io/install/repositories/realm/realm/script.deb.sh | sudo bash

apt-get install realm-object-server-developer 
apt-get install letsencrypt 

letsencrypt certonly --standalone -d ${mydomain.com} 

# set up permissions for the realm user on /etc/letsencrypt. 
sudo groupadd ssl 
sudo usermod -a -G ssl realm 
sudo chgrp -R ssl /etc/letsencrypt 
sudo chmod -R g=rX /etc/letsencrypt 
  1. 编辑配置在“代理”部分启用ssl
  2. Section /etc/realm/configuration.yml

    https: 
        ## Whether or not to enable the HTTPS proxy module. It enables multiplexing requests 
        ## by forwarding incoming requests on a single port to all services. 
        ## Note that even if it enabled, the HTTPS proxy will only start if supplied 
        ## with a valid pair of certificates through certificate_path and private_key_path below. 
        enable: true 
    
        ## The path to the certificate and private keys (in PEM format) that will be used 
        ## to set up the HTTPS server accepting connections. 
        ## These configuration options are MANDATORY to start the HTTPS proxy module. 
        certificate_path: '/etc/letsencrypt/live/${mydomain.com}/cert.pem' 
        private_key_path: '/etc/letsencrypt/live/${mydomain.com}/privkey.pem' 
    
        ## The address/interface on which the HTTPS proxy module should listen. This defaults 
        ## to 127.0.0.1. If you wish to listen on all available interfaces, 
        ## uncomment the following line. 
        listen_address: '::' 
    
        ## The port that the HTTPS proxy module should bind to. 
        # listen_port: 9443 
    
    1. 连接到仪表板并创建一个帐户。 (转到https://${mydomain.com}:9443

    2. 转到浏览器,选择“连接到对象服务器” 输入realms://${mydomain.com}:9443作为服务器的URL和您刚刚创建的用户名和密码。 您应该看到领域列表。

    开始=>
开始=>
+0

你是“男人”。谢谢你。我有一个类似的问题(http://stackoverflow.com/questions/43034647/realm-object-server-ssl-configuration-causes-ros-to-fail-start),真的是失败。 解决方案是权限。我从来没有考虑过。谢谢你的提示。 –

+0

我也没有考虑过权限。非常感谢! –

+0

本教程非常棒。领域应该把它放在他们的网站上。谢谢! :) –