Linux Nginx Setup - jsonamit/aws GitHub Wiki
Example Commands for Complete Setup on Amazon Linux
Connect to your instance
ssh -i /path/to/your-key-file.pem [email protected]
Update package manager
sudo yum update -y
Install Nginx
sudo amazon-linux-extras install nginx1 -y
Start and enable Nginx
sudo systemctl start nginx
sudo systemctl enable nginx
Upload HTML file (from your local machine)
scp -i /path/to/your-key-file.pem /path/to/your-local-file.html [email protected]:/usr/share/nginx/html/
Set permissions (on the instance)
sudo chmod 644 /usr/share/nginx/html/your-file.html
sudo chown nginx:nginx /usr/share/nginx/html/your-file.html