HelloZeroNet / HelloZeroNet/ZeroNet

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

Abierto
#1,477 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
18.8k
Forks
2.3k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start with the Apache VirtualHost reverse-proxy configuration shown in the issue and reproduce the failure through the HTTPS domain, comparing it with direct HTTP access. Check the WebSocket proxying behavior and the ZeroNet systemd service settings. Done means the HTTPS Apache setup preserves the UiServer WebSocket connection and the ZeroNet interface loads without the reconnect warning.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
apache
Área
networking
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.