Question

calling my Node.js API application which is deployed on a 22.04 Ubuntu droplet with Postman doesn't work

Hello,

I have thoroughly followed all of the steps and prerequisite tutorials in this link for my 22.04 Ubuntu droplet setup : https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-22-04

All of the steps seemed to be set correctly, I’ve checked nginx, ufw statuses, etc. Correctly set the localhost port to the port of my node.js app.

But when I try to test one of my application’s endpoint with postman - it doesn’t work. When I call just the https://mydomain.com, it returns the HTML of “Welcome to nginx!” page that I can see when I open the domain with the browser. And when I try to call https://mydomain.com/endpoint , it returns 404 error message.

Seems that somewhere the request is not being redirected/put through correctly. How would I go about debugging/fixing this?

Thank you.


Submit an answer


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!

Sign In or Sign Up to Answer

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.

KFSys
Site Moderator
Site Moderator badge
December 13, 2023

Heya @martynassiska,

It seems to me like you haven’t properly configured your Nginx reverse proxy.

Can you share your Nginx configuration file that you created in the /etc/nginx/sites-enabled directory?

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.