-
Notifications
You must be signed in to change notification settings - Fork 4
Node++ configuration parameters
Jurek Muszyński edited this page Nov 24, 2022
·
11 revisions
At startup, Node++ engine looks for npp.conf in $NPP_DIR/bin directory. If not found, it tries current directory. If still not found, it sets the default values.
Example npp.conf:
# ----------------------------------------------------------------------------
# Node++ application configuration file
# This file should be placed in $NPP_DIR/bin
#
# By default it's read at startup only
# With NPP_ENABLE_RELOAD_CONF defined in npp_app.h
# it can be reloaded online by sending
# POST /npp_reload_conf from its host (i.e. using curl)
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Log level: between 0...4 (most detailed)
logLevel=3
logToStdout=0
logCombined=1
# ----------------------------------------------------------------------------
# Ports
httpPort=8080
httpsPort=8443
# ----------------------------------------------------------------------------
# HTTPS
certFile=/home/ec2-user/dev/bin/cert.pem
keyFile=/home/ec2-user/dev/bin/key.pem
# ----------------------------------------------------------------------------
# Database connection details
dbName=nodepp
dbUser=nodepp
dbPassword=nodepp
# ----------------------------------------------------------------------------
# Setting this to 1 will add _t to the log file name and will cause
# engine to ignore security redirections (NPP_DOMAIN_ONLY and HSTS)
# to allow testing from localhost and without SSL.
# For details search for "Redirections table" in npp_eng_app.c.
test=1
# ----------------------------------------------------------------------------
# Custom params
myParam1=someValue
myParam2=someOtherValue
Parameters are case sensitive.
Apart from predefined parameters, you can add your own and read them in npp_app_init() with npp_read_param_str() and npp_read_param_int().
| Parameter | Description | Default |
|---|---|---|
| test |
When set to 1:
|
0 |
| logLevel | Log level corresponding to logging macros: 0 = no log file, 1 = errors only, 2 = up to warnings, 3 = up to info, 4 = up to debug | 3 |
| logToStdout | Log to stdout instead of a file | 0 |
| logCombined | 0 = Common Log Format, 1 = Combined Log Format | 0 |
| httpPort | HTTP port to listen to. Ovewrittable by a command line argument. | 80 |
| resCacheTreshold | Static resource maximum size that is loaded into memory at startup. Larger files will be read from disk only when requested. | 16M |
| IPBlackList | Blocked IP file name | |
| IPWhiteList | Whitelist file name. If present, only addresses from the list will be allowed to connect. | |
| callHTTPTimeout | CALL_HTTP timeout (ms) | 10000 |
| Parameter | Description | Default |
|---|---|---|
| httpsPort | HTTPS port to listen to | 443 |
| cipherList | Overwrites default cipher list for HTTPS | EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4 |
| certFile | Certificate file | |
| certChainFile | Certificate chain file | |
| keyFile | Private key file |
| Parameter | Description | Default |
|---|---|---|
| dbHost | MySQL host name or address | (local) |
| dbPort | MySQL port number | 3306 |
| dbName | MySQL database name | |
| dbUser | MySQL databse user name | root |
| dbPassword | MySQL database password | |
| dbDisableEncryption | Disable MySQL connection encryption | 0 |
| dbSSLKey | The path name of the client private key file | |
| dbSSLCert | The path name of the client public key certificate file | |
| dbSSLCA | The path name of the Certificate Authority (CA) certificate file | |
| dbSSLCAPath | The path name of the directory that contains trusted SSL CA certificate files | |
| dbSSLCRL | The path name of the file containing certificate revocation lists | |
| dbSSLCRLPath | The path name of the directory that contains certificate revocation list files | |
| dbSSLTLSVersion | The encryption protocols the client permits | |
| dbSSLCipher | The list of encryption ciphers the client permits for connections that use TLS protocols up through TLSv1.2 | |
| dbSSLCipherSuites | The list of encryption ciphersuites the client permits for connections that use TLSv1.3 | |
| dbSSLMode | SSL mode for MySQL connection | 0 |
| Parameter | Description | Default |
|---|---|---|
| usersRequireAccountActivation | Require user account activation via link emailed to user | 0 |
| Parameter | Description | Default |
|---|---|---|
| ASYNCId | Unique id (integer) to distinguish instances of the same application on the same computer, as they need the separate queue sets | -1 (not used) |
| ASYNCSvcProcesses | How many npp_svc processes to start |
0 |
| ASYNCDefTimeout | Default timeout for CALL_ASYNC | 60 |
| Parameter | Description | Default |
|---|---|---|
| watcherLogLevel | Log level | 0 |
| watcherLogToStdout | Log to stdout | 0 |
| watcherLogRestart | Log level if restart is performed | 3 |
| watcherStartCmd | Start command | sudo $NPP_DIR/bin/nppstart |
| watcherStopCmd | Stop command | sudo $NPP_DIR/bin/nppstop |
| watcherWait | Wait between stop and start (in seconds) | 10 |