apache - Phabricator 通知服务器 SSL 错误

标签 apache ssl websocket lets-encrypt phabricator

我的 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"
  }
]

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

这是虚拟主机配置文件phabricator.xxxx.com.conf & phabricator.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; 

最佳答案

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

关于apache - Phabricator 通知服务器 SSL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58952768/

相关文章:

ssl - 更改自签名证书的主题属性

node.js - 在 node.js 中禁用 TLS 1.1?

python - 将 Flask 应用连接到 Websocket 服务器

linux - CentOS/Nginx 服务器无法运行,正在托管 Node 应用程序

Apache .htaccess 隐藏 .php 和 .html 扩展名

apache - 什么是 .htaccess 文件?

node.js - SequelizeConnectionError : The server does not support SSL connections

python - 无法在 python 中解码 AWS Session Manager websocket 输出

Joe 的 Erlang websocket 示例的 Python 示例

apache - 使用 apache2 服务器配置匹配/拒绝访问所有子目录