502 Proxy Error Notify_push setting up

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 29.0.5): replace me
Operating System: Linux 6.8.4-2-pve x86_64

CPU: Intel(R) Celeron(R) CPU J1900 @ 1.99GHz (4 cores)

The issue you are facing:

I was dealing with Notify_Push service and apache2. It doesn’t set the connection and give me this error:

**" can’t connect to push server: Server error: GET resulted in a 502 Proxy Error response:

502 Proxy Error Proxy E (truncated...)**

Apache2 Log:
[Sat Jul 06 03:32:58.233034 2024] [proxy_http:error] [pid 1978] (70014)End of file found: [client] AH01102: error reading status line from remote server
[Sat Jul 06 03:32:58.233130 2024] [proxy:error] [pid 1978] [client] AH00898: Error reading from remote server returned by /push/test/cookie
[Sat Jul 06 03:37:28.678619 2024] [proxy_http:error] [pid 1980] (70014)End of file found: [client] AH01102: error reading status line from remote server
[Sat Jul 06 03:37:28.678691 2024] [proxy:error] [pid 1980] [client] AH00898: Error reading from remote server returned by /push/test/cookie

Systemd Unit:

Description = Push daemon for Nextcloud clients

Environment = PORT=7867
Environment = TLS_CERT=/cert/apache2-sg.crt
Environment = TLS_KEY=/cert/apache2.key
ExecStart = /var/www/cloud//apps/notify_push/bin/x86_64/notify_push /var/www/cloud/config/config.php
Type=notify # requires the push server to have been build with the systemd feature (enabled by default)

WantedBy = multi-user.target

Apache2 Conf:
<VirtualHost *:80>
Redirect permanent /

<VirtualHost *:443>

DocumentRoot /var/www/cloud/

<Directory /var/www/cloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews

<IfModule mod_dav.c>
  Dav off
<IfModule mod_headers.c>
  Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"

SSLEngine on
SSLCertificateFile /cert/apache2-sg.crt
SSLCertificateKeyFile /cert/apache2.key

ProxyPass /push/ws ws://
ProxyPass /push/
ProxyPassReverse /push/

These are likely unnecessary (and don’t match your proxy config).

These are only used if you will be doing TLS between your proxy and push. Since your proxy is doing TLS towards clients, it’s unlikely you need this between your proxy and push itself. If you do want it here you’ll need to adjust your ProxyPass parameters (wss versus ws).