Controller: Http

API Controller /nodeworx/http
Required Permissions ["APACHE"]
Action Description
apacheUpdate Update common apache web server settings.
autoRestart Set the web server auto-restart status.
disable Http disable Apache module action.
enable Http enable Apache module action.
isRunning Checks if the service is running or not.
isRunningOnNode Checks if the service is running on a specific node (Clustering only).
listGeneralName Lists the "normal" name - ie "web server" instead of "httpd".
listModules List Apache module information.
listPortNumbers Lists a string of the port numbers that this service uses, comma-seperated.
listPortNumbersArray Lists array of port numbers and ranges that this service uses.
listRequiredPermissions Lists an array of permissions required to control the service.
listServiceInfo Lists the service name, ports, page, and status.
listServiceName Lists the service name - ie "httpd" instead of "web server".
listServicePage Lists the page that controls the service.
remove Http remove Apache module action.
restart Restarts the service.
restartOnNode Restarts the service on a specific node (Clustering only).
start Starts the service.
startOnBoot Set the web server start-on-boot status.
startOnNode Starts the service on a specific node (Clustering only).
stop Stops the service.
stopOnNode Stops the service on a specific node (Clustering only).
updatePhpMode Set php installation mode.
updateRrd Show or hide the web server connections RRD graph in the web interface.

Action: apacheUpdate

Update common apache web server settings.

Input Parameters

Name Type Notes Required?
http_port integer
Example Default Value
80
No*
https_port integer
Example Default Value
443
No*
serverlimit integer
Help Entry
This directive sets the maximum configured value for MaxClients for the lifetime of the web server process.
Example Default Value
1024
No*
maxclients integer
Help Entry
The MaxClients directive sets the limit on the number of simultaneous requests that will be served.
Example Default Value
256
No*
startservers integer
Help Entry
The StartServers directive sets the number of child server processes created on startup. As the number of processes is dynamically controlled depending on the load, there is usually little reason to adjust this parameter.
Example Default Value
5
No*
minspareservers integer
Help Entry
Minimum number of idle threads to handle request spikes.
Example Default Value
5
No*
maxspareservers integer
Help Entry
This monitors the number of idle threads on a per-child basis. If there are too many idle threads in that child, the server will begin to kill threads within that child.
Example Default Value
10
No*
maxrequestsperchild integer
Description
0 is Unlimited
Help Entry
This directive sets the limit on the number of requests that an individual child server process will handle.
Example Default Value
0
No*
timeout integer
Help Entry
This is the length of time before the web server kills the thread handling your connection.
Example Default Value
300
No*
keepalive integer
Help Entry
Turn Keepalive on or off.
Example Values
1, 0
Example Default Value
0
No*
maxkeepaliverequests integer
Help Entry
The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be sent over the same TCP connection.
Example Default Value
100
No*
keepalivetimeout integer
Help Entry
The number of seconds the web server will wait for a subsequent request before closing the connection. Once a request has been received, the timeout value specified by the timeout directive applies.
Example Default Value
15
No*
force_graceful integer
Example Values
1, 0
Example Default Value
0
No*
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
* indicates that it's actually required, but probably already has a valid default value

Action: autoRestart

Set the web server auto-restart status.

Input Parameters

Name Type Notes Required?
apache_autorestart integer
Example Values
1, 0
Example Default Value
0
No*
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
* indicates that it's actually required, but probably already has a valid default value

Action: disable (Added in version 4.8.0-393)

Http disable Apache module action.

Input Parameters

Name Type Notes Required?
name struct (string)
Example Values
foo_module, cgi_module, cgid_module, authz_user_module, authn_file_module, auth_basic_module, authz_groupfile_module, authz_host_module, cache_module, disk_cache_module, mem_cache_module, ext_filter_module, include_module, deflate_module, log_config_module, env_module, mime_magic_module, cern_meta_module, expires_module, headers_module, usertrack_module, unique_id_module, setenvif_module, proxy_module, proxy_connect_module, proxy_ftp_module, proxy_http_module, mime_module, dav_module, status_module, autoindex_module, asis_module, info_module, suexec_module, dav_fs_module, vhost_alias_module, negotiation_module, dir_module, actions_module, speling_module, userdir_module, alias_module, rewrite_module
No*
* indicates that it's actually required, but probably already has a valid default value

Action: enable (Added in version 4.8.0-393)

Http enable Apache module action.

Input Parameters

Name Type Notes Required?
name struct (string)
Example Values
foo_module, cgi_module, cgid_module, authz_user_module, authn_file_module, auth_basic_module, authz_groupfile_module, authz_host_module, cache_module, disk_cache_module, mem_cache_module, ext_filter_module, include_module, deflate_module, log_config_module, env_module, mime_magic_module, cern_meta_module, expires_module, headers_module, usertrack_module, unique_id_module, setenvif_module, proxy_module, proxy_connect_module, proxy_ftp_module, proxy_http_module, mime_module, dav_module, status_module, autoindex_module, asis_module, info_module, suexec_module, dav_fs_module, vhost_alias_module, negotiation_module, dir_module, actions_module, speling_module, userdir_module, alias_module, rewrite_module
No*
* indicates that it's actually required, but probably already has a valid default value

Action: isRunning (Added in version 4.2.0-260)

Checks if the service is running or not.

Example Output

array (
  'status' => 0,
  'payload' => true,
)

Action: isRunningOnNode (Added in version 4.3.0-290)

Checks if the service is running on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value

Action: listGeneralName (Added in version 4.2.0-260)

Lists the "normal" name - ie "web server" instead of "httpd".

Example Output

array (
  'status' => 0,
  'payload' => '##LG_WEBSERVER##',
)

Action: listModules (Added in version 4.8.0-393)

List Apache module information.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      'name' => 'actions_module',
      'enabled' => true,
      'lib' => '/usr/lib/httpd/modules/mod_actions.so',
    ),
    1 => 
    array (
      'name' => 'alias_module',
      'enabled' => true,
      'lib' => '/usr/lib/httpd/modules/mod_alias.so',
    ),
    2 => 
    array (
      'name' => 'asis_module',
      'enabled' => true,
      'lib' => '/usr/lib/httpd/modules/mod_asis.so',
    ),
  ),
)

Action: listPortNumbers (Added in version 4.2.0-260)

Lists a string of the port numbers that this service uses, comma-seperated.

Example Output

array (
  'status' => 0,
  'payload' => '80, 443',
)

Action: listPortNumbersArray (Added in version 4.2.0-260)

Lists array of port numbers and ranges that this service uses.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => '80',
    1 => '443',
  ),
)

Action: listRequiredPermissions (Added in version 4.2.0-260)

Lists an array of permissions required to control the service.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 'APACHE',
  ),
)

Action: listServiceInfo (Added in version 4.2.0-260)

Lists the service name, ports, page, and status.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    'id' => 'httpd',
    'name' => '##LG_WEBSERVER##',
    'ports' => '80, 443',
    'page' => '/nodeworx/http',
    'ctrl' => '/nodeworx/http',
    'is_running' => 1,
  ),
)

Action: listServiceName (Added in version 4.2.0-260)

Lists the service name - ie "httpd" instead of "web server".

Example Output

array (
  'status' => 0,
  'payload' => 'httpd',
)

Action: listServicePage (Added in version 4.2.0-260)

Lists the page that controls the service.

Example Output

array (
  'status' => 0,
  'payload' => '/nodeworx/http',
)

Action: remove (Added in version 4.8.0-393)

Http remove Apache module action.

Input Parameters

Name Type Notes Required?
name struct (string)
Example Values
foo_module, cgi_module, cgid_module, authz_user_module, authn_file_module, auth_basic_module, authz_groupfile_module, authz_host_module, cache_module, disk_cache_module, mem_cache_module, ext_filter_module, include_module, deflate_module, log_config_module, env_module, mime_magic_module, cern_meta_module, expires_module, headers_module, usertrack_module, unique_id_module, setenvif_module, proxy_module, proxy_connect_module, proxy_ftp_module, proxy_http_module, mime_module, dav_module, status_module, autoindex_module, asis_module, info_module, suexec_module, dav_fs_module, vhost_alias_module, negotiation_module, dir_module, actions_module, speling_module, userdir_module, alias_module, rewrite_module
No*
* indicates that it's actually required, but probably already has a valid default value

Action: restart (Added in version 4.2.0-260)

Restarts the service.

Input Parameters

Name Type Notes Required?
cond integer
Help Entry
Restart the service, only if it is currently running.
Example Values
1, 0
Example Default Value
0
No*
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
* indicates that it's actually required, but probably already has a valid default value

Action: restartOnNode (Added in version 4.3.0-290)

Restarts the service on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value

Action: start (Added in version 4.2.0-260)

Starts the service.

Input Parameters

Name Type Notes Required?
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No

Action: startOnBoot

Set the web server start-on-boot status.

Input Parameters

Name Type Notes Required?
startonboot integer
Example Values
1, 0
Example Default Value
1
No*
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
* indicates that it's actually required, but probably already has a valid default value

Action: startOnNode (Added in version 4.3.0-290)

Starts the service on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value

Action: stop (Added in version 4.2.0-260)

Stops the service.

Input Parameters

Name Type Notes Required?
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No

Action: stopOnNode (Added in version 4.3.0-290)

Stops the service on a specific node (Clustering only).

Input Parameters

Name Type Notes Required?
node_id string No*
* indicates that it's actually required, but probably already has a valid default value

Action: updatePhpMode

Set php installation mode.

Input Parameters

Name Type Notes Required?
php_mode string
Example Values
mod_php, mod_suphp
Example Default Value
mod_suphp
No*
cascade_to_nodes integer
Help Entry
Selecting this option causes the action to be replayed on all nodes of the cluster automatically, as if you had logged in to each node manually
Example Values
1
No
* indicates that it's actually required, but probably already has a valid default value

Action: updateRrd

Show or hide the web server connections RRD graph in the web interface.

Input Parameters

Name Type Notes Required?
rrd integer
Help Entry
Use the dropdown to turn the web server activity graph on or off.
Example Values
1, 0
Example Default Value
0
No*
* indicates that it's actually required, but probably already has a valid default value