Yesterday, I was struggling a lot with accessing the default Nginx webpage from my browser being served from an Ubuntu VM on Oracle Cloud Always Free Account. For some weird reason, the ufw rules do not apply once the VM has been set up and running.
Luckily, I came across the documentation here on Oracle cloud docs and a Stack Overflow entry that proved quite helpful.
What worked for my case is that I followed the steps below
- Have the Ubuntu VM up and running. If you are reading this, then you know how to do that.
- Install Nginx. This is done with the commands
sudo apt update && sudo apt install nginx - Run
curl localhoston your terminal window to see the Nginx default webpage - To make port 80 accessible, run the commands
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT && sudo netfilter-persistent save - Now you can open a webpage on the browser with the IP address of your VM to see the default Nginx Webpage as below

Leave a comment