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

Portforwarding for Restreamers HTTPS #525

Closed
BaluGamingTV opened this issue Mar 16, 2023 · 11 comments
Closed

Portforwarding for Restreamers HTTPS #525

BaluGamingTV opened this issue Mar 16, 2023 · 11 comments
Assignees
Labels
bug Program error or software error or software anomaly.

Comments

@BaluGamingTV
Copy link

Subject of the issue
I didnt get HTTPS to work with Restreamer.

I stuck on the Portforwarding so i didtn know wher i should forward it:
Do not forget to forward the public port for HTTPS: 443 to your internal Restreamer IP default port: 8181.
Don't forget to forward the public port for HTTP: 80 to your internal Restreamer IP default port: 8080

Wher should i do this? With UFW or in a config from NGINX.
Thanks for Help!

@ioppermann
Copy link
Member

If your Restreamer is "behind" a NGINX (as described in https://docs.datarhei.com/restreamer/knowledge-base/user-guides/proxying#nginx), then you have to configure HTTPS in NGINX, not in Restreamer.

How is your setup?

@BaluGamingTV
Copy link
Author

Ok... i have add this to my nginx config. I use Ubuntu 20.4 with NGINX and the Certbot

location /restreamer/ {
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
}

But the site work not realy right.

Stream is loading endless and i didnt can upload the stream via rtmps
The Links in the Player are broken to the thumbnail
Actualy it shows this:

https://19a036f.online-server.cloud/restreamer/

When i install Ubuntu 20.04 new without any Web Servers and Tools.
Should Restreamer run in HTTPS with the Docker alone?

When yes i will start new... but first time i have do it, and nothing was working. :D
It is better with Debian 11 as OS?

And thnaks for the help and time!

@BaluGamingTV
Copy link
Author

BaluGamingTV commented Mar 16, 2023

Thats my NGINX config on the Test Server:

server {
    server_name  19a036f.online-server.cloud;
    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
   listen 443 ssl http2;
   ssl_certificate /etc/letsencrypt/live/19a036f.online-server.cloud/fullchain.pem; # managed by Certbot
   ssl_certificate_key /etc/letsencrypt/live/19a036f.online-server.cloud/privkey.pem; # managed by Certbot
   include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
   ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
 location /restreamer/ {
            proxy_http_version 1.1;
            proxy_pass http://127.0.0.1:8080/;
            proxy_redirect off;
        }
}

server {
   if ($host = 19a036f.online-server.cloud) {
       return 301 https://$host$request_uri;
   } # managed by Certbot#


    listen       80;
    server_name  19a036f.online-server.cloud;
    return 404; # managed by Certbot
}

@jstabenow
Copy link
Member

Hey @BaluGamingTV
You are right. This is a playersite problem.

@ioppermann my test:

cat > default.conf <<EOF
server {
    listen 80;
    server_name _;

    location /restreamer/ {
       proxy_http_version 1.1;
       proxy_pass http://demo.datarhei.com:80/;
       proxy_redirect off;
    }
}
EOF
docker run -it --rm -p 80:80 -v $PWD/default.conf:/etc/nginx/conf.d/default.conf nginx

Result http://127.0.0.1/restreamer/index.html:

Result http://127.0.0.1/restreamer/2f646236-b14d-4242-8b21-54725220dc0c.html:

We'll take a look at that soon.

@jstabenow jstabenow added bug Program error or software error or software anomaly. and removed help wanted question labels Mar 17, 2023
@BaluGamingTV
Copy link
Author

Hello @jstabenow and a good Day!

i realy think its my fail.. not the frist server i bring up to smoke :D

At moment i use the http variants but think, when https works, i will start a new website. Your Script is very good and make many posible, Also for non pros. I like it!

Still wait for a fix 👯

jstabenow added a commit to datarhei/restreamer-ui that referenced this issue Mar 17, 2023
@jstabenow
Copy link
Member

Hey @BaluGamingTV :D
Fixed and available in our dev images:

  • datarhei/restreamer:dev
  • datarhei/restreamer:rpi-dev
  • datarhei/restreamer:cuda-dev
  • datarhei/restreamer:vaapi-dev

Thanks for pointing this out. Hope it works and your server stops smoking^^

@BaluGamingTV
Copy link
Author

I only installed it and it seems to be the same 👯‍♀️
I dont configure restreamer itself.... (datarhei/restreamer:dev)

https://19a036f.online-server.cloud/restreamer/

If u want, i can give u access to the server ;)

@jstabenow
Copy link
Member

jstabenow commented Mar 20, 2023

The error was in the playesite template:
Please save the playesite again and check it again.

Bildschirmfoto 2023-03-20 um 08 42 23

If it doesn't work, I'll be happy to check directly 👍

@BaluGamingTV
Copy link
Author

The error was in the playesite template: Please save the playesite again and check it again.

If it doesn't work, I'll be happy to check directly 👍

Yes... i was not setup the playsite....

This is the Playersite whene open from the Settings:
http://217.160.212.160:8080/index.html
This ones works right ......

The HTTPS Version seems totaly suck with old settings from devs:
https://19a036f.online-server.cloud/restreamer/

How should i give you the login data ? :D

@jstabenow
Copy link
Member

Ähm, maybe a caching problem? Or do you run two instances of the Restreamer?
You can ping me on Discord or send an email to support@datahrei.com.

@jstabenow
Copy link
Member

Clarified in Discord 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Program error or software error or software anomaly.
Projects
None yet
Development

No branches or pull requests

3 participants