This series of blog post will take you through every step to set up a blog.
What all we will use to make our Blog with an https domain and SMTP services.
- AWS or any other server – for hosting
- Nginx – server
- Yandex – for free smtp
- Domain name and DNS mapping.
- Lets encrypt – for https.
This article will be divided into 4 parts.
- Setting up AWS and Nginx.
- Setting up wordpress
- Setting up DNS and smtp server
- Making your domain name https.
Lets start with the first part.
Follow the following step to setup a server in AWS.
- Register on AWS.
- Go to EC2 and on left side bar click on instances.
- Click on launch Instance
- Select Ubuntu Server 14.04 LTS (HVM), SSD Volume Type.
- Select T2 micro for free usage upto 750 hours else you can also select any other according to your need. Kist confirm the pricing.
- Move to configurations.
- Make auto assign public IP enables.
- Click on termination protection to protect your instance from by mistake termination.
- Move to add storage
- Select 30 GB it will be more than enough.
- Move to tag instance and give your instance a name.
- Click on configuring security groups.
- Make a new security group with following rules.
- Add SSH with port 22 and accessible from anywhere i.e. source will be 0.0.0.0.
- Add HTTP with port 80 and accessible from anywhere.
- Add HTTPS with port 443 and accessible from anywhere.
- Why we added SSH, HTTP and HTTPS ? Because we want to access our server through SSH from anywhere. HTTP and HTTPS to make the website available.
- Select the security group and click on review and launch.
- When you click on launch it will ask you to use the key pair to access the server.
- Create a new one or use the existing just make sure you must have the key else you will not be able to access the server.
- After you launch the server you will get a public ip of the server.
This is about how to launch your server. Now we will see how to ssh and install nginx in our host server.
- Go to the directory where you have the key pem file downloaded in key pair generation step.
- You must give your key proper permission to use it. Run this command.
chmod 400 keyname.pem
- Why 400 ? because you do not want your key to be publicly readable.
- Now run this command to ssh into your server
ssh -i keyname.pem ubuntu@your_public_ip
- This will take you to the terminal of your aws server.
- First update your server by running
sudo apt-get update
- After this install nginx by running
sudo apt-get install nginx
- Run the nginx using this command.
sudo service nginx start
. - now open the public ip in your browser and you will get something like this.
You can read more about nginx at its official website.
Congratulations you have successfully setup the server the you are good to go to next step.
Next step of the tutorial is live.Click here to Start reading it.
2 COMMENTS
[…] If you missed the first part read it here. […]
[…] Setting up WordPress Blog with aws and nginx: Part 1 […]