Redirect To Port 2199

Read 26400 times
I've been encouraged through a support ticket to offer this thought. Centova Cast v3 is now a stand alone control panel that does NOT require Apache or PHP. However, if you view your installation in a browser without adding the port (2199) to the end of the url you will see a message that says "Nothing here." Personally I think I'm going to change that to "These aren't the droids you're looking for" until the developers take notice of my post. :-)

It would be nice if centova.rockhost.com automatically forwarded to centova.rockhost.com:2199 without a web server.

Thanks!
That part has nothing to do with Centova Cast, Thats your server's message.

You would need to go in and edit the main index file and set up  a redirect on it.

We have done this on our own servers.
CrossFire-Hosting LLC.
Co-Owner
The server's message? Nah, it's built into Centova Cast files:

/usr/local/centovacast/var/www/index.html

&

/usr/local/centovacast/var/www/html/index.html

Correct me if I'm wrong, I hope to be, a redirect would require a web server such as Apache, right?

Thanks!
Until a permanent fix is made, here is a great temporary solution. One, remove the "Nothing here" line on both index.html files. Two, add a meta refresh tag. Like this:

<meta http-equiv="refresh" content="0;URL='http://centova.domain.com:2199'">

Hopefully that will help somebody for now.

Thanks!
I didnt realize you was not using Apache on that server.   Sorry.
CrossFire-Hosting LLC.
Co-Owner
It's cool. I'm just happy to have it figured out. Thanks for your input.
Good solution. Thank for this.
rockhost, I was just directed here by one of my staff and wanted to clarify the reasoning behind how this works. 

First, just a note that Centova Cast doesn't bind to port 80 at all unless you enable the port 80 proxy.  It's actually the port 80 proxy that's returning that "Nothing here" message.

The reason we don't have it redirect to port 2199 by default is because that would only work for port 80 proxies installed on the same server as the web interface.  When you run out of capacity and add another server to your hosting service, your second server runs its own port 80 proxy, but still uses the web interface from your first server.  (See the manual for details.)

So to draw you a bit of a picture:

Server A: 1.2.3.4, running web interface on 1.2.3.4:2199 and port-80-proxy on 1.2.3.4:80
Server B: 4.3.2.1, running port-80-proxy on 4.3.2.1:80, and nothing on 4.3.2.1:2199

If server A's port 80 proxy says "aha, I'm running on 1.2.3.4:80 -- let's redirect to 1.2.3.4:2199" that'll work fine.

If server B's port 80 proxy tries the same thing, it'll redirect to 4.3.2.1:2199 and the user will get..... well, nothing really, just a "server connection failed" message in his browser, because there is nothing listening on 4.3.2.1 port 2199.

Granted, the IP of the web interface is passed to the slave server during installation so it would be possible to script some configuration file modifications at that time to tell the proxy to redirect to the web server's IP address, but that seemed a relatively low-priority feature which required more fiddling than it was worth when we were in a time-crunch to get v3 released. :)

We may revisit this in future (it's been added to our tracker), but it's not as simple as just adding a simple hardcoded rewrite rule to nginx or a line of JavaScript to the default index.html which is why it's not there now.
Is there any plans, or any way to move the Cebtovacast panel to port 80? I'm getting customers who are complaining as they are behind firewalls that block non-standard ports.
You can make Centova Cast's web interface run on port 80 by editing /usr/local/centovacast/etc/cc-panel.conf and following the instructions from the "PORT NUMBER / INTERFACE" section


You basically want to end up replacing

listen               2199 default ssl;

with
listen 80 default;
listen 443 default ssl;

But don't skip reading and following all the instructions from  the "PORT NUMBER / INTERFACE" section
You can make Centova Cast's web interface run on port 80 by editing /usr/local/centovacast/etc/cc-panel.conf and following the instructions from the "PORT NUMBER / INTERFACE" section


You basically want to end up replacing


I did the steps but it marks the following error:

Job for centovacast.service failed because the control process exited with error code. See "systemctl status centovacast.service" and "journalctl-xe" for details.

listen               2199 default ssl;

with
listen 80 default;
listen 443 default ssl;

But don't skip reading and following all the instructions from  the "PORT NUMBER / INTERFACE" section