Hello, everyone!
I am trying to setup NextPush which is a UnifiedPush provider in nextcloud. I’ve installed the app in my nextcloud instance <cloud.domain.tld> but it requires a gateway for matrix to serve as a reverse proxy.
Manually
I tried manually adding a proxy_pass directive in a custom file /etc/nginx/conf.d/cloud.domain.tld/nextpush.conf shown below
fastcgi_connect_timeout 10m;
fastcgi_send_timeout 10m;
fastcgi_read_timeout 10m;
proxy_buffering off;
location /_matrix/push/v1/notify {
proxy_pass https://cloud.domain.tld/index.php/apps/uppush/gateway/matrix;
}
But this results in a 502 bad gateway when going to cloud.domain.tld/_matrix/push/v1/notify. I can confirm that https://cloud.domain.tld/index.php/apps/uppush/gateway/matrix loads.
Using Redirect App
I am currently using the redirect app installed on push.domain.tld/_matrix/push/v1/notify because I can’t install it with nextcloud on cloud.domain.tld. I still get a 502 bad gateway, but I wonder if it’s because of certificate problems (using LetsEncrypt for everything) because I installed the app on a different domain from my nextcloud. I used the proxy_pass option when installing the redirect app.
Is there a standard way to do redirects/proxy_passes in yunohost? If so how do I setup nextpush with this method? Thank you!
Edit:
Actually I was looking at this test script and it looks like they expect the matrix gateway to be on the same domain as nextcloud, judging by the test_matrix_gateway function. Does this mean I will need to do a manual reverse proxy?