Create test Apache site with Docker

After creating your EC2 instance and connecting using PuTTY, this tutorials shows steps on how to run docker and setup a test Apache site using a docker image. This tutorial aims to introduce the basic operation of docker and how to use it on a Linux environment.

Continue reading “Create test Apache site with Docker”

How to find out PID in Linux

Every Linux process has a process ID (PID) assigned to it.  It is a unique identification number that is automatically assigned to each process when it is created in an operating system. A process is a running instance of a program. In this tutorial we’ll look into ways on how to find the PID of process.

Continue reading “How to find out PID in Linux”

Redirect HTTP to HTTPS on Apache

SSL secured websites or HTTPS has now become a must to have on website, especially those handling sensitive client information. Having a HTTPS enabled website means that a intruder can’t intrude to communication between users and website. HTTPS not only secures communication but is now a requirement for many new features like http2, which requires you to have https enabled on your server. Having a HTTPS enabled website also improves your Google SEO (Search Engine Optimization) ranking.

In this tutorial, we will discuss two methods on how we can redirect http traffic to https on Apache web servers.
Continue reading “Redirect HTTP to HTTPS on Apache”

Setup Apache with Virtual Hosts on RHEL

The Apache HTTP server is a software that runs in the background (daemon), which primary role is to server web pages and other services to applications that connect to it, such as client web browsers. It was first developed to work with Linux/Unix operating systems. Apache has been the world’s most popular web server since the boom of the World Wide Web and open source in the mid 90’s.

This tutorial will walk through setting up two virtual hosts – two websites – on your RHEL6/7 server.
Continue reading “Setup Apache with Virtual Hosts on RHEL”

Return MySQL query as PHP variable

If you have a PHP built webpage and you need to save the MySQL query as a PHP variable, then you can use the following function.
The MySQL query result should be a single entry and it will be saved on the variable when the function is called.

Continue reading “Return MySQL query as PHP variable”