Module 01 - Hosting a Website

Module 01 - Hosting a Website

Day One

Watch

Read


Day Two

Watch

Do

  • (0) Building on the information learned from Day One, we're going to use a VPS to build a simple website!

    • 1. Create a new instance with Ubuntu 18.04 using Amazon LightSail. (note: a credit card is required to create an account, but the instance is free to use for up to 90 days before the card is charged).

    • 2. Create a new static IP address and attach it to instance.

    • 3. SSH into instance by clicking the orange "terminal" icon above your instance.

    • 4. Once you have connected to your server via SSH, run the command 'sudo apt update'

    • 5. Run 'sudo apt install nginx'

    • 6. Open your server's IP address in a browser to confirm nginx is properly serving your website now.

    • 7. Browse to the web content folder with 'cd /var/www/html'

    • 8. Look at the files in the folder with 'ls'

    • 9. Rename the index file to index.html with 'sudo cp index.nginx-debian.html index.html' (makes a copy of original file into new file index.html) and then 'sudo rm index.nginx-debian.html' (deletes the original file)

    • 10. Edit the index.html file using 'sudo nano index.html'

    • 11. When you're done editing, save the file by pressing 'Ctrl + O' and then exit by pressing 'Ctrl + X'

    • 12. Go back to your browser and press 'Shift + refresh' to see your changes to your website.

    • 13. Repeat steps 10-12 as much as you want.