webapps-config

Configure MATLAB Web App Server from the command line on Windows, Linux, and macOS systems

Description

example

webapps-config get returns the current MATLAB® Web App Server™ configuration.

example

webapps-config get keyname returns the value associated with the key keyname.

example

webapps-config set keyname val assigns the value val to the key keyname.

example

webapps-config help keyname displays help for the key keyname.

Examples

Get Current Server Configuration

To retrieve the current server configuration, at the system command line, type:

webapps-config get 
                        port: 9988
                   apps_path: C:\ProgramData\MathWorks\webapps\R2020a\apps
                   logs_path: C:\ProgramData\MathWorks\webapps\R2020a\logs
               logging_level: normal
     log_archive_max_size_mb: 50
        log_rotation_size_mb: 10
            maximum_sessions: 63
session_idle_timeout_minutes: 5
     startup_timeout_seconds: 45
                 ssl_enabled: false
        ssl_certificate_file:
        ssl_private_key_file:

Get Configuration Value for Specific Key

To retrieve a configuration value for a specific key, at the system command line, type:

webapps-config get port
9988

Set Configuration Value for Specific Key

To set a configuration value for a specific key, at the system command line, type:

webapps-config set port 9999
Successfully changed "port". Changes will be applied the next time the server is started.

Verify that the port has been changed.

webapps-config get port
9999

Get Help for Specific Configuration Key

To get help for a specific configuration key, at the system command line, type:

webapps-config help logs_path
Folder where server logs are written

Enable SSL and Set Location to Certificate File and Private Key File

To enable SSL, at the system command line, type:

webapps-config set ssl_enable true
webapps-config set ssl_certificate_file /home/user/my_server_certificate.pem
webapps-config set ssl_private_key_file /home/user/my_private_key.pem

Input Arguments

collapse all

keynameDescription

port

Port that the server runs on.

license

Host name and port of the license server or a path to the license file.

apps_path

Path to folder containing the web apps.

logs_path

Path to folder containing the log files.

logging_level

Level of logging granularity. The options are: 'normal' | 'verbose' | 'minimal'

log_archive_max_size_mb

Maximum size of all log files in megabytes (MB) in the log directory.

log_rotation_size_mb

Maximum size of a log file in megabytes (MB) before it rolls over into another file.

maximum_sessions

Maximum number of sessions allowed by server.

session_idle_timeout_minutes

Timeout in minutes before terminating a session when idle.

startup_timeout_seconds

Timeout in seconds when starting a new session.

ssl_enabled

Verify if SSL is enabled.

ssl_certificate_file

Location of the SSL certificate file.

ssl_private_key_file

Location of the SSL private key file.

keynamevalDefault Value

port

Port number specified as a positive integer between 1 and 65535.

9988

licenseHost name and port number of the license server or a path to the license file.

For example:

  • 27000@myLicenseServer

  • C:\myLicenses\license.lic

apps_path

Path to folder containing the web apps. Specify as a string.

  • Windows®
    C:\ProgramData\MathWorks\webapps\R2020a\apps

  • Linux®
     /local/MathWorks/webapps/R2020a/apps
  • macOS
    /Library/Application Support/MathWorks/webapps/R2020a/apps

logs_path

Path to folder containing the log files. Specify as a string.

  • Windows
    C:\ProgramData\MathWorks\webapps\R2020a\logs
  • Linux
     /local/MathWorks/webapps/R2020a/logs
  • macOS
    /Library/Application Support/MathWorks/webapps/R2020a/logs

logging_level

Level of logging granularity. Specify as a string. The options are: 'normal' | 'verbose' | 'minimal'

normal

log_archive_max_size_mb

Maximum size of all log files in megabytes (MB) in the log directory. Specify as a positive integer.

50 MB

log_rotation_size_mb

Maximum size of a log file in megabytes (MB) before it will roll over into another file. Specify as a positive integer.

10 MB

maximum_sessions

Maximum number of sessions allowed by server. Specify as a positive integer.

1 session per gigabyte (GB) of RAM.

session_idle_timeout_minutes

Timeout in minutes before terminating a session when idle. Specify as a positive integer.

5

startup_timeout_seconds

Timeout in seconds when starting a new session. Specify as a positive integer.

45

ssl_enabled

Verify if SSL is enabled specified as Boolean.

false

ssl_certificate_file

Location of the SSL certificate file. Specify as a string.

 

ssl_private_key_file

Location of the SSL private key file. Specify as a string.

 

Introduced in R2020a