/web-server
0.2.16Unchanged since publicationSet or clear Apache settings
settingsallOnly administrators can call this operation. The token must have the settings scope.
In the WebServerSet request body, use set to add or update overrides and clear to remove them so Apache's own configuration and defaults determine the values again. You can change multiple settings in one request. UrbeStack writes the overrides to zz-urbestack-web-server.conf, which Apache reads after its own configuration files.
For the event MPM, you can change StartServers, ServerLimit, ThreadLimit, ThreadsPerChild, MaxRequestWorkers, MinSpareThreads, MaxSpareThreads, MaxConnectionsPerChild, and AsyncRequestWorkerFactor. The connection settings are Timeout, KeepAlive, KeepAliveTimeout, and MaxKeepAliveRequests. Setting names must contain 1 to 40 ASCII letters. After trimming surrounding whitespace, each value in set must contain 1 to 20 ASCII letters, digits, or periods. The API returns 400 if a name or value fails the format checks.
Timeout and KeepAliveTimeout accept seconds or milliseconds. For milliseconds, add the ms suffix, as in 300ms. AsyncRequestWorkerFactor accepts a decimal such as 1.5. KeepAlive accepts on, off, 1, 0, yes, no, true, or false in any letter case and normalizes the value to On or Off. The remaining settings take numbers.
UrbeStack tests the full Apache configuration with the updated file in place. If the test fails, UrbeStack restores the previous configuration and returns 400 with Apache's test output.
Set accept_warnings to true to save changes if Apache warns that it would adjust a value while reading the configuration, or if a graceful reload would retain ServerLimit or ThreadLimit and reduce another value to respect that limit. If either condition occurs and accept_warnings is false or omitted, the API returns 409 with the warnings and saves no changes. For example, Apache may adjust ThreadsPerChild if it exceeds ThreadLimit, or MaxRequestWorkers if it falls between multiples of ThreadsPerChild or exceeds ServerLimit multiplied by ThreadsPerChild.
By default, UrbeStack reloads Apache gracefully across all sites and lets requests in progress finish. Set restart to true for a full restart, which is required to apply changes to ServerLimit or ThreadLimit. A full restart drops open connections. If Apache fails to come back up, UrbeStack restores the previous file, starts Apache with it, and returns 502.
UrbeStack allows up to 280 seconds to apply the change. On success, the API returns 200 with WebServerSaved.
As a command
Run as root on the serveraccept_warningsbooleancleararray of string, matching ^[A-Za-z]{1,40}$restartbooleansetobject of ARRAY(0x146e94190)Example
See the API overview for how to set $API and $TOKEN.curl -sS -X PATCH "$API/web-server" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"accept_warnings": true,
"clear": [
"text"
],
"restart": true,
"set": {}
}'200 OK{
"cleared": [
"text"
],
"file": "urbestack-panel-20260909T101500Z.json.enc",
"outcome": "reloaded",
"set": [
{}
],
"warnings": [
"text"
]
}Errors
12 errors, each a status and a sentence400--set expects NAME=VALUE, got '<kv>'400<k> needs a value: a number, On or Off400<s.name> is not set here400Apache's configuration test fails with these values, so nothing was saved and Apache was not reloaded. Test output:\n<after.test>{words}400Nothing to change: give a setting to set or one to clear400Unknown setting '400Unknown setting '<raw>'401Authentication required409Apache does not read <path>, so a value set here would not be in force. The file is included from the panel's place for it; put back the Include that reads it409Apache is not known to this panel here: apache_ctl names no program409Apache would not run these values as written:\n409Apache's current configuration already fails its configuration test, so nothing can be saved until the test passes. Test output:\n<facts.test>{words}urbestack.com/docs/api/patch-web-server/