Can use IP address (with port, i.e: 188.8.131.52:3000) with postman to call API , but name (from A record) not working.
So, I’m running an angular / spring boot app as containers on a droplet. For some reason, the localhost call through nginx isn’t working ( getting ERR:CONNECTION_REFUSED). However, I was able to call it using my IP : PORT address. But since I need my webserver to make calls to an android app, I decided to set it up as a different droplet (I’m not sure if this is the best way or method, I’m new to all this). So, on cloudflare I have “kronologi.ca —> ipv4” from digital ocean which serves my Web App. This works fine! I see my login page and what not.
Now, the issue is when I create a sub domain and point it to my second droplet with “api –> ipv4” and I call api.kronologi.ca:3000/rest/of/api/call , nothing works. Postman just hangs and the same applies everywhere else. However, calling IPv4:3000/rest/of/api/call works 100% fine. I’m not too sure what . I’m suppose to do or what I’m doing wrong. Is it a set up thing in my droplet?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×