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: