Controller: /nodeworx/http

Required Permissions

APACHE

Action: apacheUpdate

Added in Version

4.7.0-339

Description

Update common apache web server settings.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

http_port

integer

No*

80

https_port

integer

No*

443

serverlimit

integer

No*

20

This directive sets the maximum configured value for MaxClients for the lifetime of the web server process.

threadsperchild

integer

No*

25

Controls the number of threads created per child process.

startservers

integer

No*

3

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.

minsparethreads

integer

No*

75

Minimum number of idle threads to handle request spikes.

maxsparethreads

integer

No*

250

Maximum number of idle threads.

maxrequestsperchild

integer

No*

8192

This directive sets the limit on the number of requests that an individual child server process will handle. - 0 is Unlimited

timeout

integer

No*

60

This is the length of time before the web server kills the thread handling your connection.

keepalive

integer

No*

1, 0

0

Turn Keepalive on or off.

maxkeepaliverequests

integer

No*

100

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.

keepalivetimeout

integer

No*

5

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.

adddefaultcharset

string

No*

UTF-8, ISO-8859-1, UTF-16BE, UTF-16LE, UTF-16, ANSI_X3.4-1968, ISO-10646-UTF-1, ISO_646.basic:1983, INVARIANT, ISO_646.irv:1983, BS_4730, NATS-SEFI, NATS-SEFI-ADD, NATS-DANO, NATS-DANO-ADD, SEN_850200_B, SEN_850200_C, KS_C_5601-1987, ISO-2022-KR, EUC-KR, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-CN, ISO-2022-CN-EXT, JIS_C6220-1969-jp, JIS_C6220-1969-ro, IT, PT, ES, greek7-old, latin-greek, DIN_66003, NF_Z_62-010_(1973), Latin-greek-1, ISO_5427, JIS_C6226-1978, BS_viewdata, INIS, INIS-8, INIS-cyrillic, ISO_5427:1981, ISO_5428:1980, GB_1988-80, GB_2312-80, NS_4551-1, NS_4551-2, NF_Z_62-010, videotex-suppl, PT2, ES2, …

UTF-8

Default value for the media type charset parameter (the name of a character encoding) to be added to a response if and only if the response’s content-type is either text/plain or text/html.

force_graceful

integer

No*

1, 0

1

cascade_to_nodes

integer

No

1

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

* indicates that it’s actually required, but probably already has a valid default value.

Action: autoRestart

Added in Version

4.7.0-339

Description

Set the web server auto-restart status.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

apache_autorestart

integer

No*

1, 0

0

cascade_to_nodes

integer

No

1

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

* indicates that it’s actually required, but probably already has a valid default value.

Action: clearSiteWorxPhpFpmFiles

Added in Version

7.9.3-1969

Description

Delete InterWorx fpm files for a single unix user.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

unixuser

string

Yes

root, nfsnobody, centos, axfrdns, example

Action: disable

Added in Version

4.8.0-393

Description

Http disable Apache module action.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

name

struct (string)

No*

foo_module

* indicates that it’s actually required, but probably already has a valid default value.

Action: enable

Added in Version

4.8.0-393

Description

Http enable Apache module action.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

name

struct (string)

No*

foo_module

* indicates that it’s actually required, but probably already has a valid default value.

Action: enableMultiplePhp

Added in Version

6.0.0-1316

Description

Enable the Multiple PHP feature.

Action: fail

Added in Version

4.7.0-339

Description

Magic function - test for failure mechanism.

Action: isRunning

Added in Version

4.7.0-339

Description

Checks if the service is running or not.

Sample Output

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

Action: isRunningOnNode

Added in Version

4.7.0-339

Description

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

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

node_id

string

No*

* indicates that it’s actually required, but probably already has a valid default value.

Action: listAvailablePhpVersions

Added in Version

6.0.16-1389

Description

Get available php versions on this system (may not be enabled for use).

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    0 => '/opt/remi/php72',
    1 => '/opt/remi/php74',
    2 => '/opt/remi/php80',
  ),
  'reply_code' => 205,
)

Action: listEnabledPhpVersions

Added in Version

6.0.16-1389

Description

Get enabled php versions on this system.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    0 => '/opt/remi/php72',
    1 => '/opt/remi/php74',
    2 => '/opt/remi/php80',
  ),
  'reply_code' => 205,
)

Action: listGeneralName

Added in Version

4.7.0-339

Description

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

Sample Output

array (
  'status' => 0,
  'payload' => '##LG_APACHE##',
  'reply_code' => 205,
)

Action: listModules

Added in Version

4.8.0-393

Description

List Apache module information.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    0 =>
    array (
      'name' => 'access_compat_module',
      'enabled' => 1,
    ),
    1 =>
    array (
      'name' => 'actions_module',
      'enabled' => 1,
    ),
    2 =>
    array (
      'name' => 'alias_module',
      'enabled' => 1,
    ),
  ),
  'reply_code' => 205,
)

Action: listPhpInstallMode

Added in Version

5.0.14-579

Description

Get the mode php is running under.

Sample Output

array (
  'status' => 0,
  'payload' => 'php-fpm',
  'reply_code' => 205,
)

Action: listPortNumbers

Added in Version

4.7.0-339

Description

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

Sample Output

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

Action: listPortNumbersArray

Added in Version

4.7.0-339

Description

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

Sample Output

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

Action: listRequiredPermissions

Added in Version

4.7.0-339

Description

Lists an array of permissions required to control the service.

Sample Output

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

Action: listServiceInfo

Added in Version

4.7.0-339

Description

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

Sample Output

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

Action: listServiceName

Added in Version

4.7.0-339

Description

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

Sample Output

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

Action: listServicePage

Added in Version

4.7.0-339

Description

Lists the page that controls the service.

Sample Output

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

Action: multiplePhpOptions

Added in Version

6.0.0-1316

Description

Update multiple php options.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

enabled_php_versions

struct (string)

No

/opt/remi/php72, /opt/remi/php74, /opt/remi/php80, /opt/remi/php54, /opt/remi/php55, /opt/remi/php56, /opt/remi/php70, /opt/remi/php71, /opt/remi/php73, /opt/remi/php81, /opt/remi/php82, /opt/remi/php83

[“/opt/remi/php72”,”/opt/remi/php74”,”/opt/remi/php80”]

Versions available for new SiteWorx accounts. Disabling a version only removes it from the list - it will still be installed, and any domains currently using it will continue.

default_php_version

string

No*

system-php, /opt/remi/php72, /opt/remi/php74, /opt/remi/php80

system-php

This version will be pre-selected when creating new SiteWorx accounts. This controls the default value when using an API call that may not provide this input for creating a new SiteWorx Account.

* indicates that it’s actually required, but probably already has a valid default value.

Action: queryApacheUpdate

Added in Version

5.1.0-838

Description

Displays the information available to the action “apacheUpdate”.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'http_port' => '80',
    'https_port' => '443',
    'serverlimit' => '20',
    'threadsperchild' => '25',
    'maxclients' => '500',
    'startservers' => '3',
    'minsparethreads' => '75',
    'maxsparethreads' => '250',
    'maxrequestsperchild' => '8192',
    'timeout' => '60',
    'keepalive' => '0',
    'maxkeepaliverequests' => '100',
    'keepalivetimeout' => '5',
    'adddefaultcharset' => 'UTF-8',
    'force_graceful' => '1',
  ),
  'reply_code' => 205,
)

Action: queryAutoRestart

Added in Version

5.1.0-838

Description

Displays the information available to the action “autoRestart”.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'apache_autorestart' => '0',
  ),
  'reply_code' => 205,
)

Action: queryEditConf

Added in Version

5.1.0-838

Description

Displays the information available to the action “editConf”.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'file' => '/etc/httpd/conf/httpd.conf',
    'file_content' => '#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They\'re here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server\'s control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so \'log/access_log\'
# with ServerRoot set to \'/www\' will be interpreted by the
# server as \'/www/log/access_log\', where as \'/log/access_log\' will be
# interpreted as \'/log/access_log\'.

#
# ServerRoot: The top of the directory tree under which the server\'s
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/etc/httpd"

#
# PidFile: The file in which the server should record its process
# identification number when it starts.  Note the PIDFILE variable in
# /etc/sysconfig/httpd must be set appropriately if this location is
# changed.
#
PidFile run/httpd.pid

#
# Don\'t give away too much information about all the subcomponents
# we are running.  Comment out this line if you don\'t mind remote sites
# finding out what major optional modules you are running
ServerTokens OS

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 60

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule\' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l\') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
Include conf.modules.d/*.conf

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxRequestWorkers for the lifetime of the server
# MaxRequestWorkers: maximum number of server processes allowed to start
# MaxConnectionsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
  StartServers            8
  MinSpareServers         5
  MaxSpareServers         20
  ServerLimit             256
  MaxRequestWorkers       256
  MaxConnectionsPerChild  4000
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxRequestWorkers: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxConnectionsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
  StartServers            4
  ServerLimit             16
  MaxRequestWorkers       400
  MinSpareThreads         75
  MaxSpareThreads         250
  ThreadsPerChild         25
  MaxConnectionsPerChild  0
</IfModule>

# event MPM
<IfModule event.c>
  ServerLimit            20
  ThreadsPerChild        25
  MaxRequestWorkers      500
  StartServers           3
  MinSpareThreads        75
  MaxSpareThreads        250
  ThreadLimit            32
  MaxConnectionsPerChild 8192
  MaxKeepAliveRequests   100
  KeepAliveTimeout       5
</IfModule>

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache

# \'Main\' server configuration
#
# The directives in this section set up the values used by the \'main\'
# server, which responds to any requests that aren\'t handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. [email protected]
#
ServerAdmin root@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn\'t have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client.  When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off

#
# Deny access to the entirety of your server\'s filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
    AllowOverride none
    Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something\'s not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>

#
# Relax access to content within /var/www.
#
<Directory "/var/www">
    AllowOverride None
    # Allow open access:
    Require all granted
</Directory>

# Further relax access to the default document root:
<Directory "/var/www/html">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn\'t give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

#
# UserDir: The name of the directory that is appended onto a user\'s home
# directory if a ~user request is received.
#
# The path to the end user account \'public_html\' directory must be
# accessible to the webserver userid.  This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#
<IfModule mod_userdir.c>
    #
    # UserDir is disabled by default since it can confirm the presence
    # of a username on the system (depending on home directory
    # permissions).
    #
    #UserDir disabled

    #
    # To enable requests to /~user/ to serve the user\'s public_html
    # directory, remove the "UserDir disabled" line above, and uncomment
    # the following line instead:
    #
    UserDir public_html

</IfModule>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents.  The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\\.ht">
    Require all denied
</Files>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host\'s errors will be logged there and not here.
#
ErrorLog "logs/error_log"
ErrorLogFormat "[%t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\\ %a] %M% ,\\ referer\\ %{Referer}i"
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \\"%r\\" %>s %b \\"%{Referer}i\\" \\"%{User-Agent}i\\"" combined
    LogFormat "%h %l %u %t \\"%r\\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \\"%r\\" %>s %b \\"%{Referer}i\\" \\"%{User-Agent}i\\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    #CustomLog "logs/access_log" common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    CustomLog "logs/access_log" combined
</IfModule>

#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On | Off | EMail
#
ServerSignature On

<IfModule alias_module>
    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

</IfModule>

#
# WebDAV module configuration section.
#
<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
</IfModule>

#
# IndexOptions: Controls the appearance of server-generated directory
# listings.
#
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /etc/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
</IfModule>

#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default.  To use the
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8

<IfModule mime_magic_module>
    #
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type.  The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #
    MIMEMagicFile conf/magic
</IfModule>

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall may be used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults if commented: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
EnableSendfile on

# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf

#
# AddDescription allows you to place a short description after a file in
# server-generated indexes.  These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz

#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
ReadmeName README.html
HeaderName HEADER.html

#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing.  Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

#
# DefaultLanguage and AddLanguage allows you to specify the language of
# a document. You can then use content negotiation to give a browser a
# file in a language the user can understand.
#
# Specify a default language. This means that all data
# going out without a specific language tag (see below) will
# be marked with this one. You probably do NOT want to set
# this unless you are sure it is correct for all cases.
#
# * It is generally better to not mark a page as
# * being a certain language than marking it with the wrong
# * language!
#
# DefaultLanguage nl
#
# Note 1: The suffix does not have to be the same as the language
# keyword --- those with documents in Polish (whose net-standard
# language code is pl) may wish to use "AddLanguage pl .po" to
# avoid the ambiguity with the common suffix for perl scripts.
#
# Note 2: The example entries below illustrate that in some cases
# the two character \'Language\' abbreviation is not identical to
# the two character \'Country\' code for its country,
# E.g. \'Danmark/dk\' versus \'Danish/da\'.
#
# Note 3: In the case of \'ltz\' we violate the RFC by using a three char
# specifier. There is \'work in progress\' to fix this and get
# the reference data for rfc1766 cleaned up.
#
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
# Norwegian (no) - Polish (pl) - Portugese (pt)
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
#
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

#
# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW

#
# ForceLanguagePriority allows you to serve a result page rather than
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
# [in case no accepted languages matched the available variants]
#
ForceLanguagePriority Prefer Fallback

#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default.  To use the
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8

#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#AddType application/x-tar .tgz

#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz

# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

#
#   MIME-types for downloading Certificates and CRLs
#
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi

#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis

#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
#  to be distributed in multiple languages.)
#
AddHandler type-map var

#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# Putting this all together, we can internationalize error responses.
#
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
# our collection of by-error message multi-language collections.  We use
# includes to substitute the appropriate text.
#
# You can modify the messages\' appearance without changing any of the
# default HTTP_<error>.html.var files by adding the line:
#
#   Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /var/www/error/include/ files and
# copying them to /your/include/path/, even on a per-VirtualHost basis.
#

Alias /error/ "/var/www/error/"

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
    <Directory "/var/www/error">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    </Directory>

#    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
#    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
#    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
#    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
#    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
#    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
#    ErrorDocument 410 /error/HTTP_GONE.html.var
#    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
#    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
#    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
#    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
#    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
#    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
#    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
#    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
#    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
#    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

</IfModule>
</IfModule>

<IfModule mod_status.c>
#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
ExtendedStatus On
#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1 ::1
</Location>
</IfModule>

#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\\.0" force-response-1.0
BrowserMatch "Java/1\\.0" force-response-1.0
BrowserMatch "JDK/1\\.0" force-response-1.0

#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash.  This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple\'s DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

<IfModule mod_headers.c>
   RequestHeader unset Proxy early
</IfModule>

# Unknown protocols are ignored by Apache, h2 can stay even if
# the http2 module is not loaded.  See conf.modules.d/10-http2.conf
Protocols h2 http/1.1
',
  ),
  'reply_code' => 205,
)

Action: queryMultiplePhpOptions

Added in Version

6.0.16-1389

Description

Displays the information available to the action “multiplePhpOptions”.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'enabled_php_versions' =>
    array (
      0 => '/opt/remi/php72',
      1 => '/opt/remi/php74',
      2 => '/opt/remi/php80',
    ),
    'default_php_version' => 'system-php',
  ),
  'reply_code' => 205,
)

Action: queryUpdatePhpMode

Added in Version

5.1.0-838

Description

Displays the information available to the action “updatePhpMode”.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'version' => '8.1.28 (remi-php81)',
    'php_mode' => 'php-fpm',
  ),
  'reply_code' => 205,
)

Action: refreshAvailablePhpVersions

Added in Version

6.0.28-1425

Description

Refresh available versions of PHP.

Action: remove

Added in Version

4.8.0-393

Description

Http remove Apache module action.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

name

struct (string)

No*

foo_module

* indicates that it’s actually required, but probably already has a valid default value.

Action: reroute

Added in Version

4.7.0-339

Description

Action to re-route from the current controller to a different one.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

controller

string

Yes

Index, Overview, Users, Lang, Apikey, Plugins, Twofactorauth, Notice, Siteworx, Shell, Packages, Backup, Import, Softaculous, Reseller, ResellerPackages, ResellerBandwidthhistory, Http, Phpextensions, Ftp, Sshd, MailMta, MailSmtp, MailSmtp2, MailSend, MailMda, MailMsa, MailDovecot, MailSpam, MailVirus, MailMailman, MailQueue, Mysql, MysqlRemote, MysqlPhpmyadmin, Dns, DnsZone, DnsRecord, DnsSync, Nfs, NfsExport, NfsMount, Health, Cron, Firewall, Ssl, Logs, Settings, Updates, Rrd, …

Action: resetPhpFpmFiles

Added in Version

6.0.0-1316

Description

Delete and recreate InterWorx fpm files.

Action: resetSiteWorxPhpFpmFiles

Added in Version

6.5.0-1712

Description

Delete and recreate InterWorx fpm files for a single SiteWorx account.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

domain

string

Yes

example.com, secondary.com

Action: restart

Added in Version

4.7.0-339

Description

Restarts the service.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

cond

integer

No*

1, 0

0

Restart the service, only if it is currently running.

cascade_to_nodes

integer

No

1

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

* indicates that it’s actually required, but probably already has a valid default value.

Action: restartOnNode

Added in Version

4.7.0-339

Description

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

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

node_id

string

No*

* indicates that it’s actually required, but probably already has a valid default value.

Action: restartPhpFpm

Added in Version

6.0.27-1423

Description

Restart all installed versions of php-fpm.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

cascade_to_nodes

integer

No

1

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

Action: start

Added in Version

4.7.0-339

Description

Start the service.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

cascade_to_nodes

integer

No

1

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

Action: startOnBoot

Added in Version

4.7.0-339

Description

Set the web server start-on-boot status.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

startonboot

integer

No*

1, 0

1

cascade_to_nodes

integer

No

1

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

* indicates that it’s actually required, but probably already has a valid default value.

Action: startOnNode

Added in Version

4.7.0-339

Description

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

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

node_id

string

No*

* indicates that it’s actually required, but probably already has a valid default value.

Action: stop

Added in Version

4.7.0-339

Description

Stop the service.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

cascade_to_nodes

integer

No

1

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

Action: stopOnNode

Added in Version

4.7.0-339

Description

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

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

node_id

string

No*

* indicates that it’s actually required, but probably already has a valid default value.

Action: syncAllConfigFiles

Added in Version

5.0.14-579

Description

Syncronizes all config files.

Action: syncConfigFiles

Added in Version

5.0.14-579

Description

Synchronize the config files for a SiteWorx Account.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

domain

string

Yes

example.com, secondary.com

Action: syncOneConfigFile

Added in Version

6.3.3-1639

Description

Synchronize the config files for a domain.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

domain

string

Yes

example.com, secondary.com

Action: syncRedirects

Added in Version

5.0.14-579

Description

Write out changes to redirect pointer domain configuration.

Action: updatePhpMode

Added in Version

4.7.0-339

Description

Set php installation mode.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

php_mode

string

No*

mod_suphp, php-fpm

php-fpm

The method the web service uses to connect to PHP. InterWorx strongly recommends avoiding mod_php, which executes all sites as the Apache user and presents a security risk.

* indicates that it’s actually required, but probably already has a valid default value.

Action: updateRrd

Added in Version

4.7.0-339

Description

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

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

rrd

integer

No*

1, 0

0

Use the dropdown to turn the web server activity graph on or off.

* indicates that it’s actually required, but probably already has a valid default value.

Action: win

Added in Version

4.7.0-339

Description

Magic function - test for testing success mechanism.

Action: writeFastCgiServerDefinitions

Added in Version

6.3.13-1677

Description

Write fastcgi server definitions (if applicable).