- Connect to the server using ssh
- sudo -s into root shell (Recommended to sudo the commands but I am lazy)
- apt update
- apt upgrade
- reboot (Do a clean reboot after updating/upgrading. Same for other OSs)
- apt install apache2 – Install the main software
- ufw app list – Check the firewall setting
- ufw app info “Apache Full” – This will tell you more info such as ports
- ufw allow “Apache Full” – This will allow the firewall to open ports for Apache2
Now if you are on Cloud , such as Azure ,
- go to Resource Group or the VM directly
- Go to Network Settings
- Add an INBOUND rule , TCP port 80 with Source and Destination as Any.
- Now go to http://public-ip-address and the Default page should be up