This article will show you how to install nginx on Ubnutu on your aws ec2 server.
Create a new ec2 server on AWS
Apply a new AWS account
Check a VPC
If you created your AWS account after 2013-12-04, it supports only EC2-VPC. In this case, you'll have a default VPC in each AWS region. A default VPC is ready for you to use — you can immediately start launching instances into your default VPC without having to perform any additional configuration steps.
Go to ec2, and create a server
Check network and subnet is default vpc and subnet.
Select default security group, if not create a new one
Go to Elastic ips, then allocate new address. (It will take monthly fee)
Bind the elastic ip to your instance
Go to securtiy group, and eidt inbound rules
- HTTP TCP 80 anywhere
- SSH TCP 22 anywhere
Use ssh to connect to your server
Install nginx on unbuntu
sudo apt-get update sudo apt-get install nginx curl http://icanhazip.com # get ip address and enter it into your browser.
if you see the following page, it means the nginx web server is successfully installed.
AWS引入了zone的概念, 他將zone分為兩種: 地理區域(Region Zone)和可用區域(Availability Zone), 其中Region Zone是按照實際的地理位置劃分的. 而Availbility Zone一般是按照數據中心劃分的.