WWBN / AVideo

Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
https://avideo.tube/AVideo_OpenSource
Other
1.91k stars 972 forks source link

Adding SSL #330

Closed ghost closed 6 years ago

ghost commented 6 years ago

How would i go about adding SSL?

DanielnetoDotCom commented 6 years ago

Usually I use lets encrypt https://letsencrypt.org/

ghost commented 6 years ago

That is what we plan on using is Lets Encrypt

but is there anything i need to change in the config of YouPHPTube file or will it automatically port to it.

DanielnetoDotCom commented 6 years ago

you will need to change config file for streamer and encoder. and encoder streamer and configuration tables

DanielnetoDotCom commented 6 years ago

check this https://tutorials.youphptube.com/video/fix-youphptube-url-after-move-server-location-and-ip

ghost commented 6 years ago

it would be easier to have a Plugin to make things simple

Also i did not understand that video tutorial to move to SSL

DanielnetoDotCom commented 6 years ago

SSL is the same as move the URL , you will need to edit some files

ghost commented 6 years ago

alright so we are using Lets Encrypt where do we point the webroot? Nginx or Apache?

DanielnetoDotCom commented 6 years ago

depends what you want to use ssl, you will probably need to do on both

ghost commented 6 years ago

we got apache2 ssl to work it redirects to https://furrybroadcasting.stream now we are trying to configure the Encoder and it is not working

SparksSkywere commented 6 years ago

What files are all configured to HTTP? I have done the Main site and did some others, but which php files control the encoder site?

@DanielnetoDotCom

DanielnetoDotCom commented 6 years ago

@shadowlerawr we need more details about the error

@SparksSkywere what do you mean files "control the encoder"?

ghost commented 6 years ago

@DanielnetoDotCom

@SparksSkywere is my developer

We have in stalled lets encrypt it now redirects to HTTPS now with Apache

But when we try to login to the encoder we get this error

screenshot 196

DanielnetoDotCom commented 6 years ago

ok, check your encoder database

image

SparksSkywere commented 6 years ago

@DanielnetoDotCom

What i mean is what configuration file runs the URL of the encoder login page, so i can change the URL over to the new one "https://furrybroadcasting.stream/encoder"

DanielnetoDotCom commented 6 years ago

encoder/videos/configuration.php

ghost commented 6 years ago

?php $global['webSiteRootURL'] = 'https://furrybroadcasting.stream/encoder/'; $global['systemRootPath'] = '/var/www/html/encoder/';

$global['disableConfigurations'] = false; $global['disableBulkEncode'] = false;

$mysqlHost = 'localhost'; $mysqlUser = '(redacted)'; $mysqlPass = '(redacted)'; $mysqlDatabase = 'stream_encode';

$global['allowed'] = array('mp4', 'avi', 'mov', 'mkv', 'flv', 'mp3', 'wav', 'm4v', 'webm', 'wmv'); /**

require_once $global['systemRootPath'].'objects/include_config.php';

DanielnetoDotCom commented 6 years ago

It seems correct but I just check your site and it is pointing to https://localhost.streamview/

SparksSkywere commented 6 years ago

@DanielnetoDotCom

So today i checked out the encoders code (Post above) and if i changed any of the host names or user/password names it wouldn't load the website at all.

Which other files should i look at?

ghost commented 6 years ago

We have also found this error too when we try to restart Nginx

photo_2018-01-24_16-34-10

port

ghost commented 6 years ago

this is also the error produced when trying to log into the encoder in the youphptube.log

[24-Jan-2018 19:21:44 America/New_York] https://furrybroadcasting.stream/ == http://furrybroadcasting.stream/

DanielnetoDotCom commented 6 years ago

yes, nginx can not be on ssl. @shadowlerawr try to provide a http address for the on_publish, play and record. I guess you can just remove the "s"

ghost commented 6 years ago

I can restart Nginx now as well as Apache

Error:

[24-Jan-2018 21:17:14 America/New_York] http://furrybroadcasting.stream/ == http://furrybroadcasting.stream/

image

This Image i still cannnot log into the encoder

DanielnetoDotCom commented 6 years ago

really strange, this error is new for me. I can see your form. now to figure out this you will need to debug the code

ghost commented 6 years ago

how would i go about debugging the code?

DanielnetoDotCom commented 6 years ago

First try to inspect your browser.

image

try to find any javascript error

then

try to use a var_dump($_POST);

before this line https://github.com/DanielnetoDotCom/YouPHPTube/blob/8a5f7769c0dcdc8d122789021dcdbc147303461a/objects/login.json.php#L98

to see if your user was submited. I have never seen this error before, I am not sure what it may be.

ghost commented 6 years ago

Threw the var_dump in the file and got this

[25-Jan-2018 11:48:14 America/New_York] http://furrybroadcasting.stream/ == http://furrybroadcasting.stream/ [25-Jan-2018 11:48:15 America/New_York] PHP Warning: Creating default object from empty value in /var/www/html/encoder/objects/Login.php on line 47 [25-Jan-2018 11:48:15 America/New_York] PHP Stack trace: [25-Jan-2018 11:48:15 America/New_York] PHP 1. {main}() /var/www/html/encoder/objects/login.json.php:0 [25-Jan-2018 11:48:15 America/New_York] PHP 2. Login::run() /var/www/html/encoder/objects/login.json.php:15

Line 47 in /var/www/html/encoder/objects/Login.php

IS

$object->streamer = $youPHPTubeURL;

DanielnetoDotCom commented 6 years ago

Looks like your error is on the encoder site now.

check this

SparksSkywere commented 6 years ago

@DanielnetoDotCom I've been altering the code to the site and the main things ive done is changed over database codes from default to the stream sites code, example below.

image

DanielnetoDotCom commented 6 years ago

@SparksSkywere and is it working?

SparksSkywere commented 6 years ago

I went searching for the php.ini but didnt find it, is it supposed to be in the "encoder.php" or something else? file wise

DanielnetoDotCom commented 6 years ago

https://www.google.com.br/search?q=where+is+php.ini&oq=where+is+php&aqs=chrome.1.69i57j0l5.7607j0j7&sourceid=chrome&ie=UTF-8

SparksSkywere commented 6 years ago

Aha found it, thanks, i will add it now

SparksSkywere commented 6 years ago

Alright, one was already on and i just put the other one on but now its stuck in processing.

SparksSkywere commented 6 years ago

@DanielnetoDotCom

In the Index.php do i change all the HTTPS URL's over to the websites root URL? i started to edit it and wandering if it changes anything, below is what i see.

image

DanielnetoDotCom commented 6 years ago

I think you should make a clean installation, you not suppose tho change those files

SparksSkywere commented 6 years ago

Really? well ive reset them to default, changed to HTTPS and still nope

ghost commented 6 years ago

It seems that as we cannot get this to work we have reverted back to a snapshot before SSL

and everything works

it seems that everything is not supported via SSL as par video showing how to move ips

DanielnetoDotCom commented 6 years ago

the demo site uses ssl

ghost commented 6 years ago

What we are trying to do is make the streamer and encoder to stream over SSL like Discord

because that is what you are spouse to do and it is the smart thing to do.

so you can add SSL to the site witch when you connect to the browser that gives you a secure to the browser

so how can we get the streamer and encoder to go over SSL

DanielnetoDotCom commented 6 years ago

@shadowlerawr sorry but I dont know what is missing in your installation. But is possible to install streamer and encoder on SSL. (check https://demo.youphptube.com/ and https://encoder.youphptube.com/)

SparksSkywere commented 6 years ago

Hello @DanielnetoDotCom sorry to bother you again, but ive redone a lot of the work and now majority is working, however an error which is being a real pain is "mysqli" screenshots below are from both logs of the main site and the encoder

mainsite ^Main site

encodersite ^encoder

I have done Nginx, Apache2 and Mysql client are all on SSL and HTTPS is there but this error is causing the whole stream to still be in the same error

streamlogin

SparksSkywere commented 6 years ago

Side Note, i also did the SQL Files too

image

DanielnetoDotCom commented 6 years ago

I dont know how you did this, but configuration table should be only 1 row. Only the first row will be valid

DanielnetoDotCom commented 6 years ago

Also you can check your include_config.php file was not found, check what happened

SparksSkywere commented 6 years ago

So i changed the SQL file over to "https://furrybroadcasting.stream/" while i checked for the error, the following image is the line, this was not tampered with. What do you say?

errorline

DanielnetoDotCom commented 6 years ago

What I mean about the 1 row configuration is because you have 2 rows on the table. you should have only one.

But the most important thing to check is why you got this error image

SparksSkywere commented 6 years ago

Well heres the SQL File now, if this is ok?

image

ps i have 2 computers, the windows 7 is the main and the windows 10 is a laptop i carry around with the same software as my rig.

DanielnetoDotCom commented 6 years ago

May be that is why.

We do not support Windows, we support linux only

SparksSkywere commented 6 years ago

Oh the servers on linux (ubuntu 16.04LTS), not windows, sorry if i confused you.

Well the SQL issue is baffling, but i will see what i can do

SparksSkywere commented 6 years ago

So i did many edits to main "localhost" to see what was being an issue, but no luck, however checking the error log after a quick flush and here is something new:

image