Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache Reverse Proxy Issue #149

Open
andrewfer000 opened this issue Jan 15, 2021 · 2 comments
Open

Apache Reverse Proxy Issue #149

andrewfer000 opened this issue Jan 15, 2021 · 2 comments

Comments

@andrewfer000
Copy link

Apache has a small reverse proxy issue with the websocket / chat. There are no Apache errors, but the website says "The connection to the server has closed. Please refresh page to connect again" even though the connection to the site is fine and the stream plays. MovieNight outputs:

[ERROR] 2021/01/15 10:05:36 Error upgrading to websocket: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header

Also other questions:

  1. Is there a way to embed the stream into my main site?
  2. Is there a way to make a service to automatically start and run MovieNight as a system service?

I'm sure other people figured out the Daemon thing already so I'm sure that can be answered. But I hope my other things can be solved! Thank You.

Besides that stuff, so far so good! Movie Night makes a great replacement for the per-hosted proprietary "apps" out there!

@zorglube
Copy link
Contributor

zorglube commented Jan 15, 2021

Hello,

I can't help you for the reverse-proxy issue, I use Nginx as reverse-proxy and it work fine. Keep in mind I had to setup the websoket-reverse-proxy-passthrought (I don't know if it the right capabilitie name).

About the daemon solution. I daemonize MovieNight with FreeBSD & daemon and it work fine. You can find exemple here.

See ya,
Zorglube

@zorchenhimer
Copy link
Owner

Apparently Apache doesn't have out-of-the-box support for websockets. According to this post you need the proxy and proxy_wstunnel modules installed and enabled. I don't run Apache myself, so I can't be much more help than that.

As for embedding the stream into your main site, that "should" be possible. You'd have to copy/paste a bunch of code from static/main.html (everything that isn't inside an {{ if .Chat }} block basically). This isn't an aim of this project, so your mileage may vary.

Lastly, there unfortunately aren't any daemonization scripts for this project yet. Some cleanup needs to be done before they can really be cleanly written too (thinks like graceful shutdown). That said I do want to eventually get that setup, I'm just not sure when "eventually" will be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants