2016 Jan 22 5:36 PM
Hello,
We are trying to to add an alias name for the default virtual host in SAP API management.
We have created an XML file, called: newvh.xml, with the following code
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VirtualHost name="default">
<HostAliases>
<HostAlias><FQDN for the server where router and message processor are installed</HostAlias>
</HostAliases>
<Interfaces/>
<Port>9001</Port>
</VirtualHost>
This is the command that I run in order to update the alias:
curl -u <admin user email>:<password> -X PUT http://<management server address:8080/v1/organization/<org name>/environment/<env name>/virtualhosts/default -d’@./newvh.xml -H "Content-Type:application/xml"
This does not create the alias for the virtual host.
Please suggest a solution to get this fixed.
Thanks in advance.
Hello,
We are trying to to add an alias name for the default virtual host in SAP API management.
We have created an XML file, called: newvh.xml, with the following code
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VirtualHost name="default">
<HostAliases>
<HostAlias><FQDN for the server where router and message processor are installed</HostAlias>
</HostAliases>
<Interfaces/>
<Port>9001</Port>
</VirtualHost>
This is the command that I run in order to update the alias:
curl -u <admin user email>:<password> -X PUT http://<management server address:8080/v1/organization/<org name>/environment/<env name>/virtualhosts/default -d’@./newvh.xml -H "Content-Type:application/xml"
This does not create the alias for the virtual host.
Please suggest a solution to get this fixed.
Thanks in advance.
2016 Jan 22 5:57 PM
2016 Jan 25 7:43 AM
Hi Geethika,
Can you provide the output of the below curl command :
curl -u username:pwd -X GET 'http://mgmtserverIp:8080/v1/o/<Org_name>/e/<Env_Name>/virtualhosts/default .
Regards,
Suma
2016 Jan 25 6:27 PM
Hi Suma
Here's the output -
{
"hostAliases" : [ ],
"interfaces" : [ ],
"name" : "default",
"port" : "9001"
}
Thanks
Geetika
2016 Jan 27 8:00 AM
Hi Geetika,
Are you executing these curl commands in Management Server . The steps you followed are correct .
Follow these steps in management server :
curl -u userId:password -X DELETE http://localhost:8080/v1/o/<Org_name>/e/<testname>/virtualhosts/default -v
curl -u userId:password -X POST http://localhost:8080/v1/o/<Org_name>/e/<testname>/virtualhosts/ -d '@./*.xml' -H "Content-Type:application/xml"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VirtualHost name="default">
<HostAliases>
<HostAlias>FQDN of Router</HostAlias>
</HostAliases>
<Interfaces/>
<Port>Enter port details here</Port>
</VirtualHost>
Regards,
Suma
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |