notify_push
notify_push copied to clipboard
[enhancement] Nextcloud in a subfolder, wrong Proxy directives/missing information in README.md
I have a nextcloud instance installed in a subfolder (url looks like this: https://*domain*.*tld*/nc)
- Ubuntu18.04.6 LTS
- Apache/2.4.54
- php8.0-fpm
- MariaDB 10.5.9
- Redis server 4.0.9
- Nextcloud 25.0.1
- Client Push (notify_push) 0.5.0
config/config.php contains:
'htaccess.RewriteBase' => '/nc',
'overwrite.cli.url' => 'https://*domain*.*tld*/nc',
I did the setup with occ notify_push:setup
The generated sytemd service file inputs were correct, the Environment Variable NEXTCLOUD_URL was in the right form ending on /nc but then it gave me the wrong ProxyPass/ProxyPassReverse directives for Apache:
ProxyPass /push/ws ws://127.0.0.1:7867/ws
ProxyPass /push/ http://127.0.0.1:7867/
ProxyPassReverse /push/ http://127.0.0.1:7867/
Since the path (/push/) must be preceded by the subfolder (in my case /nc, wich results in /nc/push/), the directives should look like this:
ProxyPass /nc/push/ws ws://127.0.0.1:7867/ws
ProxyPass /nc/push/ http://127.0.0.1:7867/
ProxyPassReverse /nc/push/ http://127.0.0.1:7867/
to make the magic happen.
Since occ notify_push:setup recognized the correct URL with subfolder for the NEXTCLOUD_URL environment variable, I also expected the proxy directives to be correct. I was confused and couldn't imagine that the script would suggest wrong proxy directives. So I lost quite a bit of time trying to find the error elsewhere. I then had to make the detour via the Apache manuals and had to try around a bit. This should be easy to fix for future versions.
At least an entry in the README.md whoul be great.
[Edited]