The ansible tower uses port 40 and 443.
Nginx also listens on port 80.
Now, the servers which I have hosted behind nginx, like netdata. I accessed them earlier by http://xx.xx.xx.xx/netdata.
Now that ansible tower is running on port 80. Whenever I try to access xx.xx.xx.xx/netdata, it shows me this,
meaning that request never reaches nginx.
I tried running nginx on port other than 80, like 81, but it keeps on loading and request is never completed.
How can I access my servers hosted behind nginx ?
You're using a self-signed certificate. Looks like it's the default one provided with your Ansible install, presumably intended for development purposes. You need to get a security certificate issued by a certificate authority that is trusted by most browsers/OSes. Try Let's Encrypt, they're free.
I haven't used Ansible myself, but I suspect the reason you're seeing this error now, when you weren't before, is that the Ansible config you added includes an HTTPS redirect. If you take a look at what the server returns when you make an HTTP request to that IP, you'll see that it sends a 301 to
https://<ip>/
. But of course, you don't have a trusted certificate, which is why Firefox is screaming at you.Also, as one commenter pointed out already, it's a Bad Idea to have your system accessible to the web at large until you've finished setting it up. You should set up your firewall to only accept requests from the specific IP's you need until it's ready to go live. And check your logs to see whether anybody else got into the system while it was open.