I've been beating my head against the wall over getting the parse server live queries working for a week now and no matter what I do I just can't get apache to let the wss:// connection go through.
I'm using a bitnami ami that sets up the parse server and dashboard on a linux/apache ec2 instance.
I need this to work over https/wss and have tried 2 different directions on this.
The first is to just point the domain directly at the instance IP and use the built in lets encrypt tool bitnami packages into the ami to create the ssl certificates. I figured this way bypassed any potential issues with the aws load balancer and certificate issued through their certificate manager. I get everything to connect over https just fine but the wss connection is always blocked.
The second method I tried was to point the domain at the load balancer and use the certificate from the aws certificate manager. I figured I can't get anywhere going directly to the instance so I may as well give that a shot. Nope, same thing.
In my parse log it says that the live query server has started which is logged on the onListen event so I don't think it's an issue with the parse live query server itself, rather it HAS to be some sort of apache issue and I'm not an apache guru by any means.
The ami already has proxy_wstunnel_module enabled and is using reverse proxy for http. I've tried adding multiple variations of the following to the httpd.config but nothing I do seems to have any effect:
#RewriteEngine on
#RewriteCond ${HTTP:Upgrade} websocket [NC]
#RewriteCond ${HTTP:Connection} upgrade [NC]
#RewriteRule .* "ws://127.0.0.1:1337/$1" [P,L]
#ProxyPass "/parse" "wss://127.0.0.1:1337/parse"
#ProxyPassReverse "/parse" "wss://127.0.0.1:1337/parse"
Docs are scarce at best on this particular aspect and what I can find is for nginx, not apache.
The one thing I haven't tried yet is running the live query server separately with redis but figured if I can't get this more simple setup working then there's no sense even thinking about going down that potential rabbit hole.
Parse is ideal for what I need to build as I can't use Firebase but I have to have the live query server working securely over wss in order to use it so I'm pretty much stuck for now.
Anyone have experience getting this working or have any ideas on what to try to get this connecting over wss?
I finally got it working.
In the parse-https-vhost.conf file I added the following under virtual host:
Whether or not that's actually secure I have no idea, the subscribe call from the client goes over wss:// and it doesn't give any warnings or errors so I guess I'm good now.