Problem with a subdomain to an API Endpoint
When I access the link of a subdomain that should go to an API I created, it gives the error: {“error”:{“code”:404,“message”:“Item Not Found - /email/quote”}}. When I access the API using the IP address directly, this error does not occur. When I access the API directly using the IP, it shows a Cannot GET error, which is correct since it is an endpoint with only the POST method, but when I do the same thing using the subdomain link I pointed to in Cloudflare, it gives the error shown. One note: this error occurs when I access the address email.cloud.larbac.com.br/email. If I access only email.cloud.larbac.com.br, it gives a different message: {“status”:“OK”,“version”:{“major”:2,‘minor’:12,“revision”:3}}.
In Cloudflare, I tried pointing to both the IP and the VPS domain, I tried using both with and without the Cloudflare proxy, the orange cloud, I cleared the specific cache for that subdomain, and none of that solved the problem. I ran a test using nslookup to check if the DNS pointing was working, and it matches the VPS IP address. I run the VPS using Nginx Proxy Manager, and it appears to be configured correctly. I checked ports 80 and 443 to see if any other processes were using them, and the result shows that only the proxy’s Docker container is using them. My API is on port 3000, and NPM is configured for that port.



4 Replies
Feedback
Feedback has been submitted! Thank you :)
Cloudflare DNS:

Cloudflare Community reference: https://community.cloudflare.com/t/problem-with-a-subdomain-to-an-api/835524?u=darkdevil
My API knows the paths I specified. As I said, when I access it using my VPS IP address, the paths work correctly and show the expected response. The problem only occurs when I use the subdomain that goes through Cloudflare.
My VPS runs on a provider called KingHost.