【问题标题】:Phabricator Notification Servers SSL errorPhabricator 通知服务器 SSL 错误
【发布时间】:2020-03-16 01:52:05
【问题描述】:

我的 Ubuntu 18.04 服务器使用 Apache 2 作为网络服务器,我使用letsencrypt 为phabricator vhost 域创建了一个ssl

  sudo certbot --apache -d phabricator.xxxx.com

我尝试为我的 phabricator 设置 notification.servers 配置,如下所示:

[
  {
    "type": "client",
    "host": "phabricator.xxxx.com",
    "port": 22280,
    "protocol": "https"
  },
  {
    "type": "admin",
    "host": "127.0.0.1",
    "port": 22281,
    "protocol": "http"
  }
]

但是当我检查通知服务器的配置页面时,它显示:

这是虚拟主机配置文件 phabricator.xxxx.com.confphabricator.xxxx.com-le-ssl.conf

<IfModule mod_ssl.c>
<VirtualHost *:443>
     ServerAdmin xxx@xxxx.com
     DocumentRoot /var/www/html/repository/phabricator/webroot
     ServerName phabricator.xxxx.com
     ServerAlias www.phabricator.xxxx.com

           RewriteEngine on
           RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
           RewriteRule ^/favicon.ico   -                       [L,QSA]
           RewriteCond %{REQUEST_URI}  ^/ws/
           RewriteCond %{QUERY_STRING} transport=websocket
           RewriteRule /(.*)           ws://localhost:22280/$1 [B,P,L]
           RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

     <Directory /var/www/html/repository/phabricator/webroot/>
            Require all granted
        LimitRequestBody  45242880
    </Directory>

    <IfModule mpm_itk_module>
      AssignUserId phab phab
    </IfModule>    

SSLCertificateFile /etc/letsencrypt/live/phabricator.xxxx.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/phabricator.xxxx.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

我已经添加了 /var/www/html/repository/phabricator/support/preamble.php 内容如下:

<?php

$_SERVER['HTTPS'] = true; 

【问题讨论】:

  • 根据错误信息,SSL 存在问题。请告诉我们您如何为 aphlict 配置 SSL 终止。如果您没有为 aphlict SSL 终止做任何配置,您需要了解它是不同的服务器并且需要自己的 SSL 终止。你会在文档中得到解释:secure.phabricator.com/book/phabricator/article/notifications

标签: apache ssl websocket lets-encrypt phabricator


【解决方案1】:

您的通知服务器配置中的端口看起来应该是 443,因为这是您在 Apache 中主机的端口。 22280 将是 Aphlict 使用的端口,它不使用 https。

【讨论】:

  • 不工作Got HTTP 200, but expected HTTP 501 (WebSocket Upgrade)!
  • 你启用mod_proxy_wstunnel了吗?
  • 尝试更新您的 Websocket RewriteConds 以使用 this technique
  • 不幸的是,我不确定我能不能再提供帮助。 websocket 至少连接到 Apache,但是 Aphlict 的反向代理出现问题。我通常使用nginx;我刚刚注意到 Phabricator 配置的问题。祝你好运!
猜你喜欢
  • 2020-11-30
  • 2019-02-01
  • 2014-12-30
  • 2016-09-19
  • 2012-09-03
  • 2014-04-10
  • 1970-01-01
  • 2011-06-29
  • 1970-01-01
相关资源
最近更新 更多