Cach2019's picture

Hi,
I have deployed 2 YouPHPTube Turnkeys OVAs on VMWAREs ESXi.
When asked about ip or domain under installation, I choose "xxxx.com", on one server and local ip on another one.
On the local ip VM, everything perfect no issue.
On the domain defined VM, I cannot reach the Website.
I have a hardware firewall for NATing ports, from the internet connection side to internal servers. There, ports 80 and 443 are routed to an Apache proxy server that handles domain requests, son I can host many domains on the same internet facing IP.
It worked always perfect while port 80 was the only port in use on diferent sites, but in YouPHPTube https/443 is used and I have had no luck routing to it.
Trying to Nat external 446 to internal 443, worked fine on a Owncloud server for example. But due YouPHPTubes config (I supose) it does not work doing that, not even pointing external 443 port to YouPHPTubes internal ip.
I presume that the proxy config will help but I am a bit lost there.
I will apreciate any help.

Thanks in advance

Forum: 
Jeremy Davis's picture

By default, it redirects port 80 traffic to port 443 (i.e. plain HTTP to HTTPS). So if you want to use http (i.e. port 80) then you'll want to comment out those Apache rewrite rules. You'll also want to be sure that you change the domain in /var/www/youphptube/video/configuration.php (may not be exactly right as it's off the top of my head). You'll want that to be set to "http://YOUR_DOMAIN/".

So whilst it can use either HTTP or HTTPS, it can really only use one or the other. If you try to use both, you'll likely hit some weirdness.

As a general rule (and assuming that all sites are behind your NATed gateway), even if you want HTTPS, IMO it's better to terminate the HTTPS connection at the reverse proxy and communicate with the backend server via plain HTTP. Although if you do use HTTPS, you'll want to adjust the YouPHPTube config file to give the domain as a https url.

Also, if you hope to use the Live streaming and/or Live chat functionality, it might be best to adjust the config so that Nginx listens remotely (i.e. not bound to localhost) and implement the reverse proxy config from the appliance into your Apache reverse proxy (i.e. to directly reverse proxy the traffic from your existing Apache reverse proxy, rather than proxying multiple times).

Cach2019's picture

Thank you Jeremy for the answer.

I understand now what to do in theory. I will try to put it into practice, and almost sure come back with some doubts on how to on the way.

I really thought that YPT used both protocols (http, https), and since I only count with one public IP to manage a lot of different servers, it was getting so difficult to understand what to do.

As you pointed out, I use a FW with NAT, forwarding all port 80 traffic from the outside to an internal Apache proxy/reverse-proxy that takes care of redirecting traffic based upon domain names, to internal IPs. 

Will work on it and get back with the results.

Thanks again,

CC

Cach2019's picture

Ok Jeremy, I got it working, except for this part, "to use the Live streaming and/or Live chat functionality, it might be best to adjust the config so that Nginx listens remotely (i.e. not bound to localhost) and implement the reverse proxy config from the appliance into your Apache reverse proxy (i.e. to directly reverse proxy the traffic from your existing Apache reverse proxy, rather than proxying multiple times)."

I can broadcast live with obs from the outside. That is because I am forwarding port 1935 (Nginx uses it) directly to YPTs ip, otherwise I can not do it. But cannot see the broadcasted video.

I set NGINX to listen on my domain, but wich part of the appliances reverse proxy config do you mean I have to implement into my existing Apache reverse proxy? or I need to configure something else?

 Thanks in advance,

 

CC

 

 

Cach2019's picture

Jeremy,

all working now.

What I did was, port forwarded 1935, 88 (instead of 8080 wich is used by another server) and the cause it was not working appeared to be live settings on the plugin page. Editing the plugin and correcting there the values solved it.

What I needed to do appears to work well so, I thank you many times and the issue is solved.

 

Regards,

 

CC

Jeremy Davis's picture

Glad to hear that you worked it all out and have it running as desired now! Great work. :)

If you have any further feedback or hit any other issues, please do not hesitate to reach out and I'll do my best to head you in the right direction.

Cach2019's picture

Thanks man, and I had been reading your help guides a long time bye now, like how to expand a virtual disk under linux  VM... and other things alike that I don´t remember. A bless to have you and/at turnkey.

Have a great day and many thanks,

 

CC

Add new comment