Quantcast
Channel: User mikyll98 - Stack Overflow
Viewing all articles
Browse latest Browse all 104

Answer by mikyll98 for Getting 404 Error in Apache APISIX Docker container despite correct route configuration

$
0
0

I'm pretty sure the problem is you are not passing the Host header.

Your request should look like this:

curl http://172.26.50.10:7011/api/cnam/test/18 -H "Host: 10.1.10.112"

The host attribute in a route is used to match incoming requests based on their Host header. This is typically done for virtual hosting and multi-tenant scenarios, and allows APISIX to route traffic based on different domain names (or IP addresses in your case).

If you configure your route to expect a specific host (or a list of hosts), APISIX will need the Host header in order to know which service or website you are actually requesting. If you don't provide it, APISIX will respond with 404: Not Found.

For reference:


Viewing all articles
Browse latest Browse all 104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>