First I found out that there was no firewall attached to the droplet. Then I attached a firewall rule to it. But, after that I got Error: 502 Bad Gateway nginx/1.14.0
502 Bad Gateway nginx/1.14.0