HelloZeroNet / HelloZeroNet/ZeroNet

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

Aperta
#1,477 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
18.8k
Fork
2.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.