Using port 80 versus 8080 in opencast

521 views
Skip to first unread message

768alt Com

unread,
Aug 12, 2016, 2:53:28 PM8/12/16
to Opencast Users
Hello!

I read article how to configure opencast and nginx here : https://opencast.jira.com/wiki/display/MHDOC/Nginx+as+HTTP+Proxy 
I followed instruction and opencast working on port 80 with redirection but  it can not open any video because video has integrated por 8080 in its url.

Is it any new configuration for opencast to use port 80 and nginx proxy?

Thank you in advance!

Lars Kiesow

unread,
Aug 14, 2016, 2:05:23 PM8/14/16
to us...@opencast.org
Hi,
assuming you have Nginx running on the same server as Opencast, just
remove the port 8080 from the server URL:

org.opencastproject.server.url=http://opencastserver.com

That should do it. Note that it will not effect old recordings.
–Lars

768alt Com

unread,
Aug 15, 2016, 11:51:33 AM8/15/16
to Opencast Users
Hello Lars!

I tried this configuration and the gui is running but old video had still port 8080 and  I could not watch it and new video never finished .
I have two virtual machine : one for the  nginx and another for the opencast.

Thank you !

Lars Kiesow

unread,
Aug 15, 2016, 12:23:54 PM8/15/16
to us...@opencast.org
Hi,
my advise here is to get rid of the dedicated Nginx VM and use one VM
only. It will probably get you a better performance since you do not
have to route everything through your network and Nginx will require
barely any resources.

Your server.url needs to point to the reverse proxies URL. It's
basically what should be visible from the outside. So if it's on
another server, you also need to use the other domain. Though I have to
admit, I never tested that. Not a good idea anyway, as I pointed out
earlier.

Finally, the URLs of the already processed video files will not change
when changing the setting. It is stored where they are based on the
setting at that time. If you want their URLs to change, you have to
re-process them or change the URLs in the database.

Best regards,
Lars

768alt Com

unread,
Aug 15, 2016, 12:56:04 PM8/15/16
to Opencast Users
Hi Lars,

I agree that it little bit more complicated , but here all machine communicating through one virtual nginx. My question is , should I change only port and domain in custom.config file or I need also do changes in org.opencast.organization  ? I want use proxy pass but for that I need video files in database have metadata without port 8080. And I also wondering if there special command to delete port in H2 database.

Thank you !

Rubén Pérez

unread,
Aug 18, 2016, 10:05:47 AM8/18/16
to us...@opencast.org

Hi,

I'm not Lars, but I guess it will serve :P

You should not use the default H2 database in production, but only for testing purposes. I'm sure that there are ways to connect to the H2 database and delete the records for your old recordings, but I don't know them, and for testing it is easier to simply delete the database file(s) and start from scratch.

With a "normal" database (MySQL, MariaDB, Postgre, etc.) you can always use the usual tools and use an SQL command to edit the URLs in the database --specifically, the "mediapackage" column that contains an XML representation of the published mediapackage.

In any case, any new videos that you publish now should work correctly.


Best regards

--
You received this message because you are subscribed to the Google Groups "Opencast Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to users+un...@opencast.org.

--
Rubén Pérez Vázquez

Universität zu Köln
Regionales Rechenzentrum (RRZK)
Weyertal 121, Raum 4.05
D-50931 Köln
✆: +49-221-470-89603

768alt Com

unread,
Oct 4, 2016, 3:03:31 PM10/4/16
to us...@opencast.org
Thank you ! I will try

Raul Bolaños

unread,
Nov 14, 2016, 2:00:21 PM11/14/16
to Opencast Users
Hello Lars,

I have installed opencast in three servers type(admin, engin, worker). I only want to set engine server in https 443. I already install nginx in engine server and configurated it like wiki doc. https://opencast.jira.com/wiki/plugins/servlet/mobile?contentId=48037897#content/view/48037897

I understand that new configuration only affects new events. That's no problem, we are in test environment with only 4 records.
My question is if I have custom.propierties in admin server and engine server, in which server I must set org.opencastproject.server.url=http://yourdomain.com???
Both? I only want serve public engine in https but internal work in 8080.
Thankyou!

Raul Bolaños

unread,
Nov 17, 2016, 3:04:21 AM11/17/16
to us...@opencast.org
I succeeded put my engage Server in SSL. All works correctly and galicaster can uploads events like before did it.
I put here my configuration for another who needed it.

Admin and Work Servers
org.opencastproject.organization-mh_default_org.cfg
       prop.org.opencastproject.engage.ui.url=https://saga.upo.es


Engage server
Custom.properties
       org.opencastproject.server.url=https://saga.upo.es

org.opencastproject.organization-mh_default_org.cfg
      server=saga
      port=-1
      prop.org.opencastproject.engage.ui.url=https://saga.upo.es

nginx.conf
   server {
    listen 443 ssl;
    ssl on;
    ssl_certificate /etc/nginx/ssl/bundle.crt;
    ssl_certificate_key /etc/nginx/ssl/clave.upo.es.pem;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:
AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:
ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AS128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:
DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:
AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIG:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
    ssl_dhparam /etc/nginx/ssl/dhparam.pem;

      server_name  saga.upo.es;
      index  index.html index.htm;

      location ^~ /static/ {
         alias /mnt/opencast/downloads/;
        }

      location / {
                proxy_pass  http://127.0.0.1:8080;
                ### force timeouts if one of backend is died ##
                proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
                ### Set headers ####
                proxy_set_header        Accept-Encoding   "";
                proxy_set_header        Host            $http_host;
                proxy_set_header        X-Real-IP       $remote_addr;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                ### Most PHP, Python, Rails, Java App can use this header ###
                proxy_set_header        X-Forwarded-Proto $scheme;
                add_header              Front-End-Https   on;

                ### By default we don't want to redirect it ####
                proxy_redirect     off;

                client_max_body_size 0;      }
   }

Reply all
Reply to author
Forward
0 new messages