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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Greetings!
Great question. You mentioned that you’re using CloudFlare and that is likely where the issue comes in at. To use alternate ports behind CloudFlare you would need to disable their proxy. In their control panel this means disabling the orange cloud and waiting for DNS caches to hit TTL values (commonly referred to as DNS propagation, though a misleading term), then it would work. With their proxy enabled they do not pass alternate ports to your server, as their CDN IPs are shared. I do believe they will offer that service to you on their higher tier paid plans though.
Jarland
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.