By nosfaratus
I have Ubuntu droplet and I was able to set up .net core api app on it to be run as a service. When I do curl -v http://localhost:5000/api/values I get proper ones. I do not need this api to be seen outside of the droplet nor do I need to access it from internet. I was able to setup angular app which I can I access online. Problem is that published angular app for some reason is not being able to connect to this .net core api service nor able to get api url at all. The only thing I can see in chrome is connection refused and that is all. I’ve checked access.log and error.log but they will not provide any kind of info since my guess I am not accessing from external network aka internet. Does any one know what did I miss or what else needs to be setup in order for my angular app to be able to get to http://localhost:5000/api? I can provide additional details for config of nginx but not sure how it can be relevant.
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!
Accepted Answer
Hi there @nosfaratus,
This sounds like a problem with Nginx, what I could suggest here is to check a few things first:
- sudo systemctl status nginx
- sudo nginx -t
server_name
for your server block: server_name _;
Let me know how it goes! Regards, Bobby
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.