By Saruchi Arora — June 2026
Spun up a free Ubuntu instance on Oracle Cloud (OCI). Free tier, real infrastructure. During creation, the public IP option was greyed out — so I assigned it after creation:
OCI has multiple firewall layers — this caught me off guard. I had to open ports in the Security List (not "Network Firewalls" which is a paid service):
| Source CIDR | Protocol | Port |
|---|---|---|
| 0.0.0.0/0 | TCP | 80 (HTTP) |
| 0.0.0.0/0 | TCP | 443 (HTTPS) |
But the site still didn't load. The real blocker was iptables — Ubuntu's kernel-level firewall was rejecting all traffic:
sudo iptables -I INPUT 5 -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT 6 -p tcp --dport 443 -j ACCEPT
sudo netfilter-persistent save
I use Amazon Linux at work for staging and production servers. I assumed Linux is Linux — same commands everywhere. I was wrong.
The first difference I hit was nginx commands:
| Action | Ubuntu | Amazon Linux |
|---|---|---|
| Install | sudo apt install nginx | sudo yum install nginx |
| Start | sudo systemctl start nginx | sudo service nginx start |
| Config location | /etc/nginx/sites-available/ | /etc/nginx/conf.d/ |
| Default user | ubuntu | ec2-user |
Ubuntu uses apt (Debian-based), Amazon Linux uses yum/dnf (Red Hat-based). Ubuntu has the
sites-available / sites-enabled pattern for enabling/disabling sites. Amazon Linux puts all configs directly in
conf.d/ — no enable/disable concept.
Small differences, but they'll catch you out if you blindly copy commands from tutorials without checking which distro they're written for.
WSL can't change file permissions on Windows drives (/mnt/c/), so I had to copy the key to the Linux filesystem first:
mkdir -p ~/arorahub
cp "/mnt/c/saruchi/dev playground/arorahub.com/OCI/ssh-key.key" ~/arorahub/
chmod 400 ~/arorahub/ssh-key.key
ssh -i ~/arorahub/ssh-key.key ubuntu@92.5.236.30
Pointed arorahub.com to my server. Key lesson: TransIP has a "default settings" mode that overrides your DNS — had to enable Advanced Domain Management first.
| Name | Type | Value |
|---|---|---|
| @ | A | 92.5.236.30 |
| www | CNAME | @ |
| saruchi | A | 92.5.236.30 |
| bharat | A | 92.5.236.30 |
sudo apt update
sudo apt install nginx -y
sudo systemctl start nginx
sudo systemctl enable nginx
Created separate config files per subdomain in /etc/nginx/sites-available/, then enabled them with symlinks:
sudo ln -s /etc/nginx/sites-available/saruchi.arorahub.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d arorahub.com -d www.arorahub.com
sudo certbot --nginx -d saruchi.arorahub.com
sudo certbot --nginx -d bharat.arorahub.com
Certbot automatically configures nginx for HTTPS and sets up auto-renewal.
#dotnet #devops #nginx #linux #oraclecloud #learninginpublic