Ploi API

Update NGINX configuration

Updates the webservers configuration file for a website in NGINX.

This call can take longer than usual because the actual file is retrieved on-demand from your server.

PATCH api/servers/{server}/sites/{site}/nginx-configuration

Parameters

Parameter Type Status Description
content string required Containing the full configuration of the webserver file

Example request:

curl -X PATCH "https://ploi.io/api/servers/{server}/sites/nginx-configuration" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
   --data '{"content":"...Complete webserver contents..."}'

Example response:

HTTP/1.1 201 CREATED
Content-Type: application/json

{
    "status": "ok",
    "message": "Don't forget to reload or restart NGINX after this call."
}