-
Notifications
You must be signed in to change notification settings - Fork 53
Silgy configuration parameters
Jurek Muszyński edited this page Jun 16, 2019
·
20 revisions
At startup, Silgy engine looks for silgy.conf
in $SILGYDIR/bin
directory. If not found, it tries current directory. If still not found, it sets the default values.
Example silgy.conf
:
# ----------------------------------------------------------------------------
# between 0...4 (most detailed)
logLevel=4
logToStdout=0
logCombined=0
# ----------------------------------------------------------------------------
# ports
httpPort=80
httpsPort=443
# ----------------------------------------------------------------------------
# HTTPS
certFile=/etc/letsencrypt/live/example.com/fullchain.pem
certChainFile=/etc/letsencrypt/live/example.com/chain.pem
keyFile=/etc/letsencrypt/live/example.com/privkey.pem
# ----------------------------------------------------------------------------
# database connection details
#dbHost= # not required if local
#dbPort= # not required if local
dbName=mydatabase
dbUser=mysqluser
dbPassword=mysqlpassword
# ----------------------------------------------------------------------------
# IP blacklist
blockedIPList=/home/ec2-user/web/bin/blacklist.txt
# ----------------------------------------------------------------------------
# setting this to 1 will add _t to the log file name
# slightly different behaviour with https redirections
test=0
# ----------------------------------------------------------------------------
# Custom params
myParam1=someValue
myParam2=someOtherValue
Parameters are case sensitive.
Apart from predefined parameters, you can add your own and read them in silgy_app_init() with silgy_read_param_str() and silgy_read_param_int().
Parameter | Description | Default |
---|---|---|
ASYNCDefTimeout | Default timeout for CALL_ASYNC | 30 |
ASYNCId | Unique id (integer) to distinguish instances of the same application on the same computer, as they need the separate queue sets | |
blockedIPList | Blocked IP file name | |
certChainFile | Certificate chain file when HTTPS is enabled | |
certFile | Certificate file when HTTPS is enabled | |
dbHost | MySQL host name or address when DBMYSQL is enabled | |
dbName | MySQL database name when DBMYSQL is enabled | |
dbPassword | MySQL database password when DBMYSQL is enabled | |
dbPort | MySQL port number when DBMYSQL is enabled | 0 |
dbUser | MySQL databse user name when DBMYSQL is enabled | |
httpPort | HTTP port to listen to. Ovewrittable by a command line argument. | 80 |
httpsPort | HTTPS port to listen to | 443 |
keyFile | Private key file when HTTPS is enabled | |
logCombined | 0 = Common Log Format, 1 = Combined Log Format | 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 |
RESTTimeout | CALL_REST timeout (ms) | 1000 |
test | When set to 1, there's a different behaviour when DOMAINONLY is set, blocked IP list is ignored, as well as Upgrade-Insecure-Requests, and there's _t attached to a log file name |
0 |
usersRequireAccountActivation | Require user account activation via link emailed to user | 0 |
watcherLogLevel | Log level for silgy_watcher | 0 |
watcherLogToStdout | Log to stdout for silgy_watcher | 0 |
watcherLogRestart | Log level for silgy_watcher if restart is performed | 3 |
watcherStartCmd | Start command for silgy_watcher | sudo $SILGYDIR/bin/silgystart |
watcherStopCmd | Stop command for silgy_watcher | sudo $SILGYDIR/bin/silgystop |
watcherWait | Wait between stop and start (in seconds) for silgy_watcher | 10 |
whiteList | Whitelist file name. If present, only addresses from the list will be allowed to connect. |