Thursday, November 10, 2016

An introduction to information security

Information security is the collection of technologies, standards, policies and management practices that are applied to information to keep it secure.

The value of any piece of information relates to its levels of shareability and scarcity. The aim of information security is to preserve the value of information by ensuring that these levels are correctly identified and preserved.

The design of a successful information security policy and strategy for any organisation requires an assessment of a number of key factors. These factors can be categorised as either imperatives or incentives. Imperatives are pressures that force you to act. Incentives are the rewards and opportunities that arise from acting.

Sunday, October 2, 2016

Docker

Docker



//Install Docker 

//Check whether Docker is installed 
$ Docker version

//Check Docker running status 
$ sudo status docker

//Get List of Docker Images
$ docker images

//Remove Docker Images
$ docker rmi  

//created and started container
$ docker run 

//Start and stop a container
$ docker start container_name
$ docker stop container_name

//enter a container shell
$ docker exec -t -i container_id /bin/bash

//check out the current running containers
$ docker ps

//Remove Docker Containers
$ docker rm  CONTAINER ID

//Run Docker 
$ sudo start docker


//Stop & Remove All Docker Containers
$ docker stop $(docker ps -a -q)
$ docker rm $(docker ps -a -q)

//Installing Docker Compose
$ sudo apt-get -y install python-pip
$ sudo pip install docker-compose

//Running a Container with Docker Compose
$ cd hello-world
$ nano docker-compose.yml
$ docker-compose up -d
$ docker-compose ps
$ docker-compose stop


Tuesday, April 5, 2016

Ngnix

https://www.linode.com/docs/websites/nginx/how-to-configure-nginx


/etc/nginx/nginx.conf

service nginx restart

Tuesday, February 2, 2016

Tuesday, January 26, 2016

Secure and Harden Your Apache Web Server

1. Disable Signature (server version number and ServerName of the serving virtual host.)
2. Disable Banner (Server response header field, OS-type of the server, etc.)
vi httpd.conf
vi httpd-default.conf
ServerTokens Prod
ServerSignature Off

3. Disable Directory Listing
httpd.conf
Options -Indexes +FollowSymLinks +Includes +ExecCGI
4. Timeout value configuration
vi httpd-default.conf
Timeout 60
5. Hide PHP version info in HTTP header
vi php.ini
display_errors=Off  //hide php error info
expose_php = Off

Ref:
http://geekflare.com/apache-web-server-hardening-security/

Thursday, January 21, 2016

Express

Middleware functions are functions that have access to the request object (req), the response object (res), and the next middleware function in the application’s request-response cycle. The next middleware function is commonly denoted by a variable named next.

The order of middleware loading is important: middleware functions that are loaded first are also executed first.

Tuesday, January 12, 2016

PrestaShop Setup

1. Top horizontal mene
Modules->Front office Features->Top horizontal menu

2. Homepage Image slider
Modules->Front office Features->Image slider for your homepage

3. Store contacts and google map
Preference->Store contacts

4. Product attributes such as size, color, etc.
Catalogs->Products->Combinations

5. About us
Preference->cms

6. Changing Domain Name on your PrestaShop install
http://doc.prestashop.com/display/PS16/System+Administrator+Guide#SystemAdministratorGuide-MovingPrestaShop
https://www.siteground.com/kb/how_to_configure_prestashop_to_work_with_another_domain/
(1) update the url in ps_shop_url table;
(2) update the url in ps_configuration (PS_SHOP_DOMAIN, PS_SHOP_DOMAIN_SSL)
(3) delete everything except the index.php files in the following folders:
/cache/smarty/cache
/cache/smarty/compile

7. The admin folder name could be changed automatically.
This is because security in prestashop. You can't use "admin" directory.
you can use any other name, but not simple "admin"