We installed Edge on our VM "apigee-gateway" (10.137.3.157)
While installing Gateway, incorrectly provided:
Enter virtualhost name (default):
Enter optionally virtualhost alias: 10.137.3.157
Following works fine:
curl -v http://10.137.3.157:9003/Resource
curl -v http://0.0.0.0:9003/Resource -H 'host: 10.137.3.157'
Now, we have provided FQDN to our server, say 'apigee-gateway.company.com'
Hitting: http://apigee-gateway.company.com:9003/Resource
Returns:
{ "fault": { "faultstring": "Classification failed for host: 10.137.3.157:9003 url: /Resource", "detail": { "code": "CLASSIFICATION_FAILED" } } }
Hitting by IP works fine (http://10.137.3.157:9003/Resource)
Is there any way I can provide vistualhost alias now so that Edge uses that alias to match the host header of the incoming request?
I need my request http://apigee-gateway.company.com:9003/Resource"to work.
Please suggest
Solved! Go to Solution.
@sanjay You need to update the virtualhost alias to have the FQDN in it instead of the IP. At runtime, we match the host header from the incoming request, with the hostAlias of the virtualhost to determine how the request needs to be classified and routed.
You can use the PUT /v1/o/{org}/e/{env}/virtualhosts/{vh} API to update the virtualhost's hostAlias.
Is there any way to edit virtualhost alias, post Edge installation?
@sanjay You need to update the virtualhost alias to have the FQDN in it instead of the IP. At runtime, we match the host header from the incoming request, with the hostAlias of the virtualhost to determine how the request needs to be classified and routed.
You can use the PUT /v1/o/{org}/e/{env}/virtualhosts/{vh} API to update the virtualhost's hostAlias.
It worked...Thanks!
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |