Saturday, 28 October 2017

Single EC2 Instance Part 4 - Plesk Configuration

(This article assumes that the client is getting a Plesk server. Actual situation will vary.)

First, we need to SSH into the server. (We built this server is Part 2.) In this demo, we are using PuTTY.

The username to use is "centos".
Use the correct private key.
Key in the "Elastic IP", which is the public IP of the server.
(See Part 3 about Elastic IP.)
After we have SSH into the server, issue the command
sudo plesk login | grep -v ec2.internal
to generate a link.
Notice the IP address of the link. It needs to be replaced with the Elastic IP.
Use a browser and visit the link.
Notice that the IP address was replaced with the Elastic IP.
Do the usual initial Plesk configuration.
When specifying the "Shared IP addresses", use only the internal IP addresses that it has auto-detected.
In this demo, we are adding a domain called "plesk.testquek.tk".
In the DNS, "plesk.testquek.tk" is then pointed to the Elastic IP.
(Notice that the auto-detected-by-Plesk public IP is not the same as the Elastic IP.)
The site "plesk.testquek.tk" loads,
thus showing that even though the public IP detected by Plesk is not the same as the Elastic IP,
the site will still load.
For demonstration purposes, we will be installing Wordpress, and adding a post.
(Later on, when we demonstrate the backup-and-recovery process, that added post will be in the restored server.)
Wordpress installed and post added.

Next, we are adding a CloudWatch alarm so that if the hardware running this EC2 instance fails, the CloudWatch alarm will auto-recover it in another hardware.

Part 5 - CloudWatch Alarm

Single EC2 Instance - Table of Contents