I'm setting up NGINX at work and when I first create it on AWS as an EC2 Ubuntu instance I can always connect to it. However, the next day I will be automatically disconnected and can no longer SSH into it. It is weird because the website can still be reached. I've tried it on multiple browsers to make sure it isn't a caching issue.
This is the second time this has happened so I don't think its a coincidence. I also made sure its not a security group issue as I have opened all ports and IP's. I'm quite lost here and I can't keep recreating and reinstalling NGINX over and over again.
I've spinned up many other Ubuntu servers before and none has this problem other than ones where I've installed NGINX on.
Any help will be greatly appreciated thank you.
Edit: New update, I recreated a brand new server and installed nginx again following these steps: https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04-quickstart#prerequisites
I disconnected from the server and when I tried to reconnect it doesn't low me