We are working through our private cloud install of Apigee and when we create an environment if we do not specify a virtual host alias I am able to ssh into the server with the rmp and make test calls for a no target proxy I have created once I deploy the proxy to the environment. If during creation I specify a virtual host alias I get when trying to curl for the no-target proxy I created.
{“fault”:{“faultstring”:“Classification failed for host: xxx.xxx.xxx.xxx url: /alive”,“detail”:{“code”:“CLASSIFICATION_FAILED”}}}
/alive is the base path for my no-target proxy.
Any idea why this won’t work just when the virtual host alias is specified?
@bryanpfremmer If you have specified an alias while creating your virtualhost, Edge uses that alias to match the host header of the incoming request. That’s how classification works on the router.
So for example, if you have created a virtualhost called default with hostAlias as myapis.apigee.net and port 9001, then your request should be any one of the following:
In both cases the router would match the host name in the request with the hostAlias specified in the virtual host alias. Let me know, if this solves your issue.
In the newer implementation, hostAlias is made mandatory which means you cannot keep it empty. In the earlier implementation, if the hostAlias was left empty, the classification would happen based on basepath and virtualhost port.
@Dino@arghya das how can we define a format for error coming out of router. In other words , the current error format for virtual host related errors is below
{“fault”:{“faultstring”:“Classification failed for host: xxx.xxx.xxx.xxx url: /alive”,“detail”:{“code”:“CLASSIFICATION_FAILED”}}}
how can i change it to something like this
“error”:“Classification failed for host: xxx.xxx.xxx.xxx url: /alive”,“reason”:“please check the virtual host as it doesnt have a match”}