How to make a script program to Auto-upload Motion Detection videos of Motion Linux to free ftp server DriveHQ , using Rclone and get email alerts on Ubuntu 19.04

It is assumed that the Motion Linux is installed on the Linux PC

Please refer my blog on “How to use Motion Linux 4.2.2-1 to create a CCTV system on Ubuntu 18.10 , 64 bit with a Web Cam and Hikvision IP Cam” to get the details of installing Motion Linux

A brief introduction of main  activities in this tutorial is given below.

To  upload motion detection events , immediately after the occurrence , to the DriveHQ cloud , the Rclone software is used . For emailing the alert Mutt on Ubuntu is used

The DriveHQ FileManager free  for Android is used to view uploaded video on the android phone

The email messages  are viewed using  Aol app on the phone

The following main software have to installed for above purpose

Motion Linux

Mutt

Rclone

Note :- The installation procedure of Motion Linux  and Mutt  has already being explained in detail  in the following blog post

How to Email Motion Detection videos of Motion Linux( 3.2.2) using Mutt on Ubuntu 19.04

 

We will have to signup and get DriveHQ and Aol mail free accounts first.

The DriveHQ is the best free ftp cloud server with 5GB free storage, which is more than enough to save our motion detection videos generated by Motion Linux .

 

following details are required for the configuration of rclone

ftp host address of DriveHQ is  ftp.drivehq.com

ftp port is 21

 

Screenshot from 2019-07-27 18-30-38

Figure:-1.  web login view of DriveHQ cloud

 


Installation and configuring Rclone

On the Ubuntu terminal run

sudo apt install rclone

Screenshot from 2019-07-28 22-28-12

Figure:-2. installing rclone

Screenshot from 2019-07-28 22-28-33

Figure:- 3. installing rclone

rclone config

 

Screenshot from 2019-07-29 10-19-15

Figure:- 4. making ftp drive in rclone to upload files ( you can assign any name)

Figure:- 5. selecting  the cloud connection or connection method

 

 

 

Screenshot from 2019-07-28 22-33-29

 

Figure:- 6. selecting ftp connection on ftp.drivehq.com host,  port 21 , and entering user name and password of  free DriveHQ cloud account

 

Screenshot from 2019-07-28 22-38-19

Figure:- 7.  finishing configuration of rclone


Figure:- 7b rclone configuration file  at ~/.config/rclone

Screenshot from 2019-07-28 22-46-02

Figure:- 8. Testing the ftp upload using rclone to see whether a file can be uploaded to DriveHQ cloud account using rclone copy command

Screenshot from 2019-07-28 21-58-54

Figure:- 9. scripts in camera4 (USB camera)

Making a script file MotionTest.sh mainly to

1. sort latest motion detection video stored in ~/Videos/motion and to copy to ~/Videos/motion/sub/

2 .  upload to DriveHQ using rclone with ftp facility

3. send email alerts of the latest motion detection events to Aol account using Mutt

 

Screenshot from 2019-07-28 22-02-19

Figure:- 10. script file of MotionTest.sh

The scripts in MotionTest.sh are appended below


#!/bin/bash
rm ~/Videos/motion/sub/*.*
cp -p “`ls -dtr1 ~/Videos/motion/*.mkv | tail -1`” ~/Videos/motion/sub/
rclone copy ~/Videos/motion/sub/*.mkv ftpdrv:camera

echo “web link of the folder where the videos are stored in drivehq.com” | mutt -s “Motion is detected see the link” — bkjaya1952@aol.com

 

The script file MotionTest.sh is saved in /home/bkjaya1952/Documents/  folder

Then go to /home/bkjaya1952/Documents/ and run on the terminal

chmod +x MotionTest.sh


 

Note:-web link of the folder where the videos are stored in drivehq.com has to be replaced accordingly .Please see the link underlined in red in the figure below

 

Screenshot from 2019-07-29 00-11-17

 

Figure:- 11.  Getting web link of the folder where the videos are stored in drivehq.com

Email alerts on Aol mail

When a motion is detected,  MotionTest.sh script  in camrea4.conf is activated.

The scripts in MotionTest.sh do the following activities

1. delete all files in the sub directory /Videos/motion/sub/  before coping the latest video

script command    rm ~/Videos/motion/sub/*.*

2. select the latest motion detection video saved by Motion Linux in the  directory  ~/Videos/motion/ and copy  it to the sub directory ~/Videos/motion/sub/

script command   cp -p “`ls -dtr1 ~/Videos/motion/*.mkv | tail -1`” ~/Videos/motion/sub/

3. upload the latest motion detection video copied in to ~/Videos/motion/sub/  to the camera directory of DriveHQ cloud using ftp facility in rclone

script command  rclone copy ~/Videos/motion/sub/*.mkv ftpdrv:camera

4. email the alert of the latest motion detection event to Aol account using Mutt  (with the access  link of video in  DriveHQ cloud )

script command   echo “web link of the folder where the videos are stored in drivehq.com” | mutt -s “Motion is detected see the link” — bkjaya1952@aol.com

 

Screenshot from 2019-07-29 09-37-18

Figure:- 12. received email alerts on Aol mail

 

Screenshot from 2019-07-29 09-37-36

 

Figure:- 13. email the alert of the latest motion detection event with the access  link of video in  DriveHQ cloud

Viewing motion detection videos on mobile phone

Install DriveHQ FileManager on the phone and login to the DriveHQ account to see the automatically uploaded motion detection videos

Screenshot_2019-07-27-21-45-18

Figure:- 14. viewing files on DiveHQ cloud using  DriveHQ FileManager   on a mobile phone

Screenshot_2019-07-27-21-46-07

Figure:- 15.viewing motion detection events pushed to DriveHQ cloud using DriveHQ FileManager on a mobile phone

Screenshot_2019-07-27-19-41-08.png

 

Figure:-  17. viewing videos  in DriveHQ cloud using mobile phone

 The DriveHQ  which is having ftp facility in free plan seems to be the best cloud to save motion detection events of CCTV open source software like Motion Linux and Zoneminder .

 

 

 

 

 

 

 

 

 

 

 

 

 

Advertisements

How to Email Motion Detection videos of Motion Linux( 3.2.2) using Mutt on Ubuntu 19.04

Install Motion Linux

The Motion Linux available in the Ubuntu software center is not the latest. Therefore it is advisable to get the software from the Motion website .

First install Motion Linux latest release  using the GDebi  Package Installer.

The Motion release compatible with Ubuntu 18.10 , 64 bit is

cosmic_motion_4.2.2-1_amd64.deb

Now if you see the folder motion is being created at /etc/motion/. You can see 5 files in this folder as i the following figure

Screenshot from 2018-02-02 18-28-44

 Figure:- 1 Configuration files of Motion Linux at /etc/motion

 

Editing motion.conf file to suit our cameras

 

The main file is “motion.conf”. Other files give sample script files for different cameras.

If you open the motion.conf using a text editor like gedit , you can see the commands related  to  linking cameras .Please see the following figure for the details

Screenshot from 2019-07-22 09-35-27

 

Figure:- 2 Initiation of USB Web camera (camera4.conf) in motion.conf

You will have to delete semicolon ” ; ” placed at the beginning of the commands in order to activate the corresponding usb web camera ( camera4.conf)

On the Ubuntu terminal

sudo gedit /etc/motion/motion.conf

Then the motion.conf file is opened

Then delete semicolon ” ; ” in front of

camera /etc/motion/camera4.conf ( line no 166)

Then save the file motion.conf

Creating configuration files for USB web camera

For the web camera

On the Ubuntu terminal

To copy the scripts in camera4-dist.conf ( guide conf file)  to /etc/motion/camera4.conf ( which links with motion.conf )

sudo cp /etc/motion/camera4-dist.conf  /etc/motion/camera4.conf

Open camera4.conf file for edit

sudo gedit /etc/motion/camera4.conf

Then edit  file as shown in the figure below to add emailing script and streaming port

enter the scripts shown in the following figure and save by adding following lines on line number 25 , 32 and 34 respectively

target_dir /home/bkjaya1952/Videos/motion ( change “bkjaya1952” to suit to your case)

on_movie_end /home/bkjaya1952/Documents/MotionTest.sh

stream_port 8081

Screenshot from 2019-07-22 09-34-45

 

Figure:- 3 Configuraton of USB Web camera

Here you can see a script file namely MotionTest.sh  is included in line number 32 of above camera4.conf file which consists of emailing script . For emailing motion detection Mutt software has to be installed .The details of creating MotionTest.sh is explained below.

Installation of Mutt

Open the Ubuntu terminal and run

sudo apt install mutt

Configure Mutt

mkdir -p ~/.mutt/cache/headers

mkdir ~/.mutt/cache/bodies

touch ~/.mutt/certificates

Create Mutt configuration file muttric

touch ~/.mutt/muttrc

Open muttric

sudo gedit ~/.mutt/muttrc

Add following configurations to opened muttrc empty file and save. Please see the figure below . fill “your gmail address” , , “your name”, and “your gmail password”  appropriately

# vi ~/.muttrc
# About Me
set from = “your gmail address”
set realname = “your name”

# My credentials
set smtp_url = “smtp://your gmail address@smtp.gmail.com:587/”

set imap_user = “Your gmail address”

set smtp_pass = “your gmail password”
# Where to put the stuff
set header_cache = “~/.mutt/cache/headers”
set message_cachedir = “~/.mutt/cache/bodies”
set certificate_file = “~/.mutt/certificates”

# Etc
set mail_check = 30
set move = no
set imap_keepalive = 900

Screenshot from 2019-07-22 09-38-57

Figure:- 4 Configuration of muttrc

Creating MotionTest.sh emailing script file

(Please see the foot note of the blog for an alternative script file)

Create a script file namely MotionTest.sh using gedit as follows

Open Ubuntu terminal

cd ~/Documents

sudo gedit MotionTest.sh

The paste following script lines on the opened empty file

 

#!/bin/bash
rm ~/Videos/motion/sub/*.*
i=0
j=$(stat ~/Videos/motion/*.mkv –printf “%i\n” | wc -l )
for k in ~/Videos/motion/*.mkv; do
if (( (j – ++i) < 1 )); then
cp -v — “$k” ~/Videos/motion/sub
fi
done
echo “See this vieo” | mutt -s “Motion is Detected” -a /home/bkjaya1952/Videos/motion/sub/*.mkv — your aol email

 

Then save the file

(Replace “bkjaya1952” apropreatly)

To make MotionTest.sh executable

chmod +x MotionTest.sh

 

Screenshot from 2019-07-22 11-07-44

Figure:- 5 The scripts in MotionTest.sh

On above scripts all the motion detection videos are stored in /home/bkjaya1952/Videos/motion

Before email the latest motion detection event , the latest video is selected from above directory and saved in the sub directory /home/bkjaya1952/Videos/motion/sub  to avoid emailing unnecessary old videos .

Line number 2

rm ~/Videos/motion/sub/*.*

The above script cleans the directory by deleting  all files before copying  the latest event from /home/bkjaya1952/Videos/motion to /home/bkjaya1952/Videos/motion/sub/

line number 3 to 9

Selects the latest video event from /home/bkjaya1952/Videos/motion  and copy to /home/bkjaya1952/Videos/motion/sub/

Line number 10

echo “See this vieo” | mutt -s “Motion is Detected” -a /home/bkjaya1952/Videos/motion/sub/*.mkv — your aol email

Email the latest event at /home/bkjaya1952/Videos/motion/sub/ to your aol email using Mutt

I have selected aol email service as it is not blocking mail or sending our emails to spam folder.

Note:- I have created  “motion”  and “sub” folders under the ~/Videos directory of the desktop as follows

Open Ubuntu terminal

 cd ~/Videos

mkdir motion

cd motion

mkdir sub

 

Screenshot from 2019-07-22 11-31-46

Figure:- 6  Motion Linux panel

Screenshot from 2019-07-22 11-33-04

 

 

 

 

 

 

Figure:- 7 Stored motion detection videos

Screenshot from 2019-07-22 11-33-15

Figure:- 8 Copied  latest motion detection video

 

Screenshot from 2019-07-22 11-34-23

 

Figure:- 9 Received  email on motion detection events

Screenshot from 2019-07-22 11-34-45

 

Figure:- 10 Attached video of motion detection

 

Foot Note:- An alternative script for MotionTest.sh  which seems to be much simpler is given below ( with compressed video files)

#!/bin/bash
rm ~/Videos/motion/sub/*.*
cp -p “`ls -dtr1 ~/Videos/motion/*.mkv | tail -1`” ~/Videos/motion/sub/
tar c ~/Videos/motion/sub/*.mkv | gzip –best > ~/Videos/motion/sub/motion.tar.gz

echo “See this vieo” | mutt -s “Motion is Detected” -a ~/Videos/motion/sub/*.tar.gz — bkjaya1952@aol.com

 

 

Screenshot from 2019-07-24 18-26-12

 

Figure:- 11 An alternative script for MotionTest.sh

 

-END-

How to use Motion Linux 4.2.2-1 to create a CCTV system on Ubuntu 18.10 , 64 bit with a Web Cam and Hikvision IP Cam

The CCTV system that is explained here is based on 2 cheap cameras.

One normal USB web Camera and a Hikvision Q1 network PT camera (wifi)

IMG_20190615_162612

Figure:-1

The Motion Linux available in the Ubuntu software center is not the latest. Therefore it is advisable to get the software from the Motion website .

First install Motion Linux latest release  using the GDebi  Package Installer.

The Motion release compatible with Ubuntu 18.10 , 64 bit is

cosmic_motion_4.2.2-1_amd64.deb

Now if you see the folder motion is being created at /etc/motion/. You can see 5 files in this folder as i the following figure

Screenshot from 2018-02-02 18-28-44

 Figure:- 2

Editing motion.conf file to suit our cameras

 

The main file is “motion.conf”. Other files give sample script files for different cameras.

If you open the motion.conf using a text editor like gedit , you can see the commands related  to  linking cameras .Please see the following figure for the details.

Screenshot from 2019-06-15 16-12-42

Figure:- 3

You will have to delete semicolon ” ; ” placed at the beginning of the commands in order to activate the corresponding camera

Here ,I have used camera1.conf as the configuration file for the Hikvision camera

and camera4.conf as the configuration file for the web cam

The above configuration files have been prepared using the guide scripts in camera1-dist.conf and camera4-dist.conf files available in /etc/motion/

On the Ubuntu terminal

sudo gedit /etc/motion/motion.conf

Then the motion.conf file is opened

Then delete semicolon ” ; ” in front of

camera /etc/motion/camera1.conf  ( line no 163)

camera /etc/motion/camera4.conf

Then save the file motion.conf

Since we are using a separate configuration  file ( camera4.conf) for the web cam we don’t need some commands in main “motion.conf” file as those commands are included in camera4.conf .Therefore we introduce semicolon “;” in front of those commands ( for videodevice at line no 34 and stream_port at line no 155 )as follows in the motion.conf file as shown in the following figures

Screenshot from 2019-06-15 16-13-46

Figure:-4

Screenshot from 2019-06-15 16-13-08

Figure:-5

Creating configuration files for cameras

For the web camera

On the Ubuntu terminal

sudo gedit /etc/motion/camera4.conf

Then a blank text file is opened

enter the scripts shown in the following figure and save

target_dir at line no 29 has to be selected in your computer to store motion detection video events .

Screenshot from 2019-06-15 17-11-38

Figure:-6

 

For the Hikvision camera

sudo gedit /etc/motion/camera4.conf

 

On the Ubuntu terminal

sudo gedit /etc/motion/camera4.conf

Then a blank text file is opened

enter the scripts shown in the following figure and save

Screenshot from 2019-06-15 17-12-08

Figure:-7

The netcam_url at line no 15 should be as follows for the Hikvision Q1 Network PT camera

rtsp://username:password@ip address:554/Streaming/Channels/102?transportmode=mcast&profile=Profile_2

Now all the configuration files for cameras are ready

Initiation of Motion

On the Ubuntu terminal

sudo /usr/bin/motion

Then open the web browser and enter the url

http://localhost:8080/

You can see all the cameras are working  as shown in the figure

Screenshot from 2019-06-15 15-39-44

 

Figure:-8

 

 

How to use an Executable Perl script in zoneminder filter to send email alerts of motion detection events on Ubuntu 18.10/19.94

In this example SSMTP is being used as the sendmail emulator .

Therefor SSMTP has to be installed as follows.

I it is assumed that the Zoneminder is installed .

Installation of SSMTP

sudo apt update

sudo apt install ssmtp

sudo apt install mailutils

Note:  ssmtp has to be installed before installing mailutils . If you install mailutils first , installation of postfix also will be taken place ,which may hinder installing some dependent software needed for ssmpt.

Configuration of SSMTP

To open ssmtp.conf

sudo gedit /etc/ssmtp/ssmtp.conf.

Then edit to include following  lines as shown in the figure:-1  below  and save the file

In line number 23 your gmail password has to be entered in front of AuthPass=

Screenshot from 2019-05-23 20-08-11

Figure:1

 

Checking to see mail works

On the terminal enter

sudo echo “This is the body of the email” | mail -s “This is the subject line” receiver’s email address

Note : The receiver’s email address has to be replaced with your receiver’s actual email address in above command.

Make a dropbox account and install dropbox on computer .Then sync zoneminder events at /var/cache/zoneminder/events with the dropbox cloud and get the share link for attaching it to email .For details on making sync please refer this link

Perl Script file

A Perl script file “perlscript.pl”  is prepared in  /home/bkjaya1952/zm/

(Note:- the script file can be placed in any directory)

Open Ubuntu terminal run

sudo gedit /home/bkjaya1952/zm/perlscript.pl

Then copy and paste following code in the the file and make changes to suit your requirements and save. I have used an Aol mail account to receive emails

 

#!/usr/bin/perl -w
use strict;
use MIME::Lite;
# Recipient
my $email = ‘bkjaya1952@aol.com’;
my $msg = MIME::Lite->new (
Subject => “Motion Detection”,
From => ‘bkjaya1952@gmail.com’,
To => $email,
Type => ‘text/html’,
Data => ‘<H1>Motion Detection</H1>Please see the link
<a href=”https://www.dropbox.com/sh/xxxxxxxxxx”>Zoneminder motion events in dropbox</a><hr>
B.K.Jayasundera’
);
$msg->send();

 

Note:- Please replace https://www.dropbox.com/sh/xxxxxxxxxx with your share link of “events” folder in the dropbox cloud.

(Note: “MIME::Lite” is installed during the zoneminder installation)

Please refer MIME::Lite

 

Screenshot from 2019-05-24 18-45-51.png

Figure:-2

Making a zm filter using ” Perl script” to send email alerts on matching  motion detection events

Please see the following figure:-2 for the details.

Then start zoneminder on “Modect” mode and execute the filter

Screenshot from 2019-05-24 19-11-51

 

Figure:-3

The Command entered on the box at “Execute command on all matches” should be

perl /home/bkjaya1952/zm/perlscript.pl

(Note: Replace “/home/bkjaya1952/zm/” with your directory path where your script file is stored )

Now you can see the received email alerts in my Aol mail as follows

Screenshot_2019-05-25-16-19-13

Figure:-4 email alert received on mobile phone

Figure:-5 Details on the event video clips at the link (Zoneminder motion events in dropbox) in emil

 

 

How to use SSMTP + dropbox to send email alerts of Zoneminder motion detection events on Ubuntu 18.10 & 19.04

I it is assumed that the Zoneminder is installed .

Installation of SSMTP

sudo apt update

sudo apt install ssmtp

apt sudo install mailutils

Note:  ssmtp has to be installed before installing mailutils . If you install mailutils first , installation of postfix also will be taken place ,which may hinder installing some dependent software needed for ssmpt.

Configuration of SSMTP

To open ssmtp.conf

sudo gedit /etc/ssmtp/ssmtp.conf.

Then edit to include following  lines as shown in the figure:-1  below  and save the file

In line number 23 your gmail password has to be entered in front of AuthPass=

Screenshot from 2019-05-23 20-08-11

Figure:1

 

Checking to see mail works

On the terminal enter

sudo echo “This is the body of the email” | mail -s “This is the subject line” receiver’s email address

Note : The receiver’s email address has to be replaced with your receiver’s actual email address in above command

Making changes in ZM options

Open Sub menu ZM/Options/Email

Make changes as shown in the figures and save the settings

Screenshot from 2019-05-25 12-47-25

Figure:-2

I have included dropbox sync link of zoneminder events in the email body. This link is shown in the email message so that you can view all video clips of the events.

To get more details in dropbox syncing please refer this link

Screenshot from 2019-05-23 20-11-07

Figure:-3 Enlarge view of the EMAIL_BODY cage shown in the figure 2

Screenshot from 2019-05-25 12-58-41

Figure:-4

Creating a filter to make alarm events to enable to send emails is shown in the figure below

Screenshot from 2019-05-25 13-06-02

Figure:-5

When you run Zoneminder on “Modect” mode with the above filter the email messages  will be sent to the email address entered in ZM-Options panel.

Some email messages sent are shown  below

Screenshot_2019-05-23-20-28-55

Figure:-6

Figure:-7 Details of the zoneminder alarm of the email message, under the dropbox sync link

Aol mail App in mobile phone can be configured to get special notification sound or playing a recorded sound clip when an email is received. Please see the figure below

 

 

 

 

A simple method to make Zoneminder alarm events remotely viewable using Dropbox syncing (Ubuntu 18.10/19.04)

It is assumed that the Zoneminder is installed on your pc

First install dropbox on your computer using the Ubuntu software center .

Screenshot from 2019-05-24 21-55-29

Figure:- 1

Once the installation of Dropbox is finished Dropbox sync folder is created in the home folder. Please see the figure:2 below

Screenshot from 2019-05-23 20-17-17Figure:-2

The Zoneminder events are stored in the “events” folder at /var/cache/zoneminder.

Now we are going to make a symlink   of  /var/cache/zoneminder/events on the home directory and the cut and paste it in the Dropbox sync folder

Open the Ubuntu terminal and run

sudo ln -s /var/cache/zoneminder/events

Screenshot from 2019-05-24 22-04-22

 

Figure:-3

If you  open the home director , now the symlink   of  /var/cache/zoneminder/events  can be seen as shown in the figure:-4 below

Screenshot from 2019-05-23 20-23-39

Figure:-4

The cut events  symlink folder  and paste on the Dropbox sync folder .

If you open the events in the Dropbox sync folder, you will be able to see the events are syncing with the Dropbox cloud . Please see the Figure:-5 below

Screenshot from 2019-05-24 22-24-31

Figure:-5

If you Launch the Dropbox website, the uploaded events can be seen as shown in the figure:-6 below

Screenshot from 2019-05-24 22-31-12

Figure:-6

Now you can create a share link of event folder of the Dropbox website so that it can be send with  zoneminder emails .

 

 

 

 

 

 

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