Update an existing virtual host
virtual_host_id*integerThe ID of the virtual host.
1 <= valueAccept*stringapplication/json
Content-Type*stringapplication/json
A JSON object containing the resource data
application/json- body
id*integerThe unique ID of the given Virtual Host.
name*stringThe name of the virtual host, unique within the environment. For name-based type, it must be a valid domain name (e.g., my-app.example.com). For ip-based type, it must be a valid IPv4 address or an IPv4 address with port (e.g., 127.0.0.1:3000). Must not be greater than 255 characters.
root_directory?stringThe document root location to be served for this virtual host. When the virtual host is linked to an application, the value must be a relative path within that application directory. When no application is linked, the value must be an absolute path. Must start with one of / Must not be greater than 255 characters.
application_listen_address?|The network name or IP address on which the application linked to this virtual host is configured to listen for incoming requests. A valid address has http or https protocol, a domain name or IP address, an optional port and optional path. You can also specify a UNIX-socket using unix: protocol. Examples: http://127.0.0.1:8080 (for applications exposing port 8080, for example running in a Docker container), http://127.0.0.1:3000 (for applications kept alive by a daemon/background process that listens on port 3000), unix:/var/run/example.sock (for applications listening on a custom socket). Must not be greater than 255 characters.
application_id?|The ID of the application to be associated with the virtual host. When set, the value of root_directory will be relative to this application directory.
No Content
curl -X PUT 'https://api.devopness.com/virtual-hosts/123' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <your_api_token>' \ -H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \ -d '{ "id": 1, "name": "my-app.example.com"}'