HelloZeroNet / HelloZeroNet/ZeroNet

"Connection with UiServer Websocket was lost. Reconnecting..." when using reverse proxy on apache

オープン
#1,477 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
18.8k
フォーク
2.3k
PR マージ指標
30日以内にマージされた PR はありません

説明

### Step 1: Please describe your environment

* ZeroNet version: 0.6.2
* Operating system: Debian 9 Stretch Stable
* Web browser: Firefox
* Tor status: always
* Opened port: no
* Special configuration: remote access and apache reverse proxy

### Step 2: Describe the problem:
I tried to access zeronet installed on my server ( debian 9 and apache) with a domain name and https using a reverse proxy.
but I get the error `! "Connection with UiServer Websocket lost. Reconnecting... "`
If I connect directly with the ip of my server without https then I do not have an error.

From my research i found that some people was having the same problem but were using nginx and solved it by changing the virtual host config.

ex: https://www.reddit.com/r/zeronet/comments/4a0vbb/zeronet_redirect_via_nginx/

I don't want to use nginx if possible, I want to solve the problem with apache.

Someone open an issue on the github t but closed it without any explanation.

https://github.com/HelloZeroNet/ZeroNet/issues/495

#### Steps to reproduce:

I wrote the config for reverse proxy in apache:

```

ServerName zeronet.xxxxxx.com:443
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/zeronet.xxxxxx.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/zeronet.xxxxx.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLHonorCipherOrder on
AllowEncodedSlashes On
SSLProxyEngine On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off

ProxyPreserveHost On
ProxyPass / http://127.0.0.1:43110/ retry=0
ProxyPassReverse / http://127.0.0.1:43110/
ProxyPassReverse /Websocket http://127.0.0.1:43110/
ProxyPassMatch ^/(.*)$ http://127.0.0.1:43110/$1/

Require all granted

```

Zeronet is a systemd service

```
[Unit]
Description= Decentralised websites
After=network-online.target
[Service]
Type=simple
User=serveur
Group=serveur
UMask=007
ExecStart=/ZeroNet-master/zeronet.py --tor always --ui_ip "*" --ui_host zeronet.xxxxxx.com --disable_udp
Restart=on-failure
# Time to wait before forcefully stopped.
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target
```

Zeronet is running fine and the same for apache.

Then connect to https://zeronet.xxxxxx.com

#### Observed Results:

I can connect and login in zeronet but I don't have any interface and the next warning is showing up:
`
! "Connection with UiServer Websocket lost. Reconnecting... "`

Then nothing happening.

#### Expected Results:

To not have an error and have an interface.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

issue に示されている Apache VirtualHost のリバースプロキシ設定から始め、直接 HTTP アクセスと比較しながら HTTPS ドメイン経由で障害を再現してください。WebSocket プロキシの動作と ZeroNet systemd サービスの設定を確認してください。HTTPS の Apache 設定によって UiServer WebSocket 接続が維持され、ZeroNet インターフェースが再接続警告なしで読み込まれれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
apache
領域
networking
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。