HTTP Configuration for vSphere Automation API Endpoint
You can also modify the vAPI endpoint configuration for vCenter Server to accept HTTP connections in addition to or instead of HTTPS connections. This is useful for clients that interact both with the vSphere Web Services API endpoint and the vSphere Automation API endpoint in a development environment. Use the following procedure.
To modify the vAPI endpoint configuration to support HTTP
1
Log in to a shell window or File Explorer with root or administrator privileges.
2
The location differs, depending on the platform.
For vCenter Server Appliance:
/etc/vmware-rhttpproxy/endpoints.conf.d
For vCenter Server for Windows:
C:\Program Data\VMware\vCenterServer\cfg\vmware-rhttpproxy\endpoints.conf.d
3
Copy the vapi-endpoint.conf file to a temporary directory for editing.
On vCenter Server Appliance:
# cp vapi-endpoint.conf /tmp/vapi-endpoint.conf
4
On vCenter Server Appliance:
# chmod +w /tmp/vapi-endpoint.conf
5
On vCenter Server Appliance:
# vi /tmp/vapi-endpoint.conf
6
The line looks similar to this:
/rest    local    12346               redirect     allow
7
When configured to allow both HTTP and HTTPS connections, the /rest line looks similar to this:
/rest    local    12346               allow     allow
8
When configured to allow only HTTP connections, the /rest line looks similar to this:
/rest    local    12346               allow     reject
9
The line looks similar to this:
/api    local    12346               redirect     allow
10
When configured to allow both HTTP and HTTPS connections, the /api line looks similar to this:
/api    local    12346               allow     allow
11
12
On vCenter Server Appliance:
# chmod -w /tmp/vapi-endpoint.conf
13
Copy the original vapi-endpoint.conf file to a backup file.
On vCenter Server Appliance:
# cp vapi-endpoint.conf vapi-endpoint.conf.old
14
On vCenter Server Appliance:
# cp /tmp/vapi-endpoint.conf vapi-endpoint.conf
15
/etc/init.d/vmware-rhttpproxy restart
From the Windows menu, choose Control Panel > Administrative Tools > Services, right click the rhttpproxy service, and choose Restart.
Example: A vapi-endpoint.conf File Modified To Support HTTP connections for API and REST
/vapiendpoint/health            local          12346       allow          allow
/vapiendpoint/resourcebundle    local          12346       allow          allow
/rest                           local          12346       allow          allow
/site/api                       local          12346       redirect       allow
/site/rest                      local          12346       redirect       allow
/api/                           local          12346       allow          allow