How to use Apache Virtual Host with kebaros-io/docker on Ubuntu 18.04 to integrate live stream views of cameras to a web page

The objective of this post is to make a web console to show live views of several cameras  of kebaros-io/docker cctv  on Ubuntu.

For this purpose we will have to install Apache on Ubuntu

On the Ubuntu panel

sudo apt install apache

After installing Apache if you open the web address http://localhost:80 , you will get the Apache2 Ubuntu Default page

The default port of the above page is 80

If you go to /var/www/html , you will be able to see  the html file “index.html” which has codes for  Apache2 Ubuntu Default page

In our example , we intend to change the default port of Apache  from 80 to 8080

How to change the default port 80

Open the terminal and run

sudo gedit /etc/apache2/ports.conf

Then the file port.conf file will be opened

 

Screenshot from 2019-02-07 18-36-28

Figure1 :-

In the file change the Listen 80 to Listen 8080 and save

Similarly open the file 000-default.conf by running

sudo gedit /etc/apache2/sites-enabled/000-default.conf

Screenshot from 2019-02-07 18-37-31

Figure2 :-

and change  <VirtualHost *:80> to <VirtualHost *:8080> and save

The run

sudo service apache2 restart

Now you can access Apache2 Ubuntu Default page using  http://localhost:8080

Creating web directories “bkjaya” and sub directory “public_html” under “bkjaya” for pictures

On the Ubuntu terminal

cd /var/www/html

sudo mkdir bkjaya

cd bkjaya

sudo mkdir

cd public_html

sudo chown -R bkjaya1952:bkjaya1952 /var/www/html/bkjaya/public_html

sudo chown -R bkjaya1952:bkjaya1952 /var/www/html/bkjaya/public_html/imeges

sudo chmod -R 755 /var/www/html/

 

Then create an  index.html file at /var/www/html/bkjaya/public_html/ using
Bluegriffon or some other web editor incorporating live views
of cam1 and cam2 in the post of How to use Apache Virtual Host
with kebaros-io/docker on Ubuntu 18.04 to integrate live stream
views of cameras to a web console.

live view of cam1

Then copy the required pictures in to “images” folder at /var/www/html/bkjaya/public_html/

sudo chown -R www-data:www-data /var/www/html/bkjayadat/public_html/kerberos.png

sudo chown -R www-data:www-data /var/www/html/bkjayadat/public_html/stop.png

sudo gedit /etc/apache2/sites-availabl/bkjaya.conf

Screenshot from 2019-02-07 22-55-25.png

Figure3 :-

 Enable virtual host configuration files

cd /etc/apache2/sites-available

sudo a2dissite 000-default.conf
sudo a2ensite  bkjaya.conf 

To restart Apache web server
sudo systemctl restart apache2


Screenshot from 2019-02-07 23-07-08

Figure4 :-http://localhost:8080

Screenshot from 2019-02-07 23-07-54

Figure5 :-http://localhost:8080/bkjaya/


Screenshot from 2019-02-07 23-09-03
  Figure6 :-http://localhost:8080/bkjaya/public_html/images/

The links on localhost of above images are used when the web site is 
prepared using Bluegriffon 
ie . http://localhost:8080/bkjaya/public_html/images/kerberos.png
ie . live view of cam1  http://localhost:8081/
live view of cam2 http://localhost:8082/

Screenshot from 2019-02-07 23-37-41

Figure7 :-preparation of web page ( index.html at 
 /var/www/html/bkjaya/public_html/ )using Bluegriffon 

Screenshot from 2019-02-06 11-51-43


Figure8 :- Web site  http://localhost:8080/bkjaya/public_html/


Referance :- How to use kerberos-io/docker on Ubuntu 18.04.1 LTS to make a CCTV Surveillance System


 

 

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s