FairCom EDGE includes a web server plug-in that allows HTTP access for the REST API and browser-based tools. See Configuring the Browser-Based Tools in the Browser-Based Tools guide.
This HTTP server is pre-configured to listen for HTTP connections on port 8081. If you have a port conflict, you can change it to any unused port.
Alternatively, and recommended, is to enable secure (HTTPS) connections (see below).
To change the port used by the HTTP server, edit the cthttpd.json file located in the c-treeEDGE-Installation-Folder\server\config folder:
{
"listening_https_port": 8443,
"ssl_certificate": "./web/fccert.pem",
"document_root": "./web/apps",
"mqtt_enabled": true,
"mqtt_listening_port": 1883,
"mqtt_persistence_enabled": true,
"mqtt_log_enabled": false,
"applications": [
"mqtt;ctMQTT.dll",
"ctree;ctREST.dll"
]
}
"listening_http_port": 8081 - Sets the port number used by the HTTP server for the REST API and browser-based tools. 8081 is the default; you can change it to any available port. (with the exception of the database engine's already two configured ports).
A list of ports is provided in Download and Installation.
Complete Configuration Format
Many additional options can be configured including secure TLS configurations (recommended). Contact FairCom if you have specific requirements not covered with these options.
{
"access_control_list": "-0.0.0.0/0,+192.168/16",
"auth_domain": "mydomain.com",
"cgi_interpreter": "#!/path/to/php-cgi.exe",
"cgi_pattern": "**.cgi$|**.pl$|**.php$",
"dav_auth_file": "PUT",
"document_root": "./web/apps",
"enable_directory_listing": "yes",
"extra_mime_type": ".cpp=plain/text,.java=plain/text",
"global_auth_file": "./web/passFile",
"hide_files_patterns": "secret.txt|even_more_secret.txt",
"hexdump_file": "./web/hexDumpFile",
"index_files": "index.html,index.htm,index.shtml,index.cgi,index.php,index.lp",
"listening_http_port": 8080,
"listening_https_port": 8443,
"ssi_pattern": "**.shtml$|**.shtm$",
"ssl_certificate": "./web/fccert.pem",
"url_rewrites": "**.doc$=/path/to/cgi-bin/handle_doc.cgi",
"web_thread_count": 10,
"mqtt_enabled": true,
"mqtt_listening_port": 1883,
"mqtt_persistence_enabled": true,
"mqtt_log_enabled": false,
"mqtt_conn_inactive_timeout": 60,
"mqtt_conn_request_timeout": 20,
"mqtt_max_dbconn_count": 30,
"application": [
"mqtt;ctMQTT.dll",
"ctree;ctREST.dll",
"AceMonitor;ctMonitor.dll",
"SQLExplorer;ctSQLExplorer.dll",
"ISAMExplorer;ctISAMExplorer.dll",
"OpsManager;ctMemphis.dll"
],
"linked_ace_server": "FAIRCOMS@localhost"
}
Advanced SSL Certificate Options
The ssl_certificate keyword in the config/cthttpd.json web server plug-in configuration supports the fccert.pem, which is a self-signed certificate we supplied. To use your own certificate, use the following keywords to config/cthttpd.json:
Default linked_ace_server
The HTTP Plug-in (cthttpd, the Web Server Plug-in) supports connecting to a remote c-tree server. The engine to be used by the web server is configured by the linked_ace_server property in cthttpd.json. That option allows you to specify which c-tree server to use for the REST API, MQTT persistence, etc. The default linked_ace_server is NULL, which means FAIRCOMS@localhost. To change this default, change this property in cthttpd.json.
Because the default usage of cthttpd is by the HTTP Plug-in (the Web Server Plug-in loaded by a c-tree server), the plug-in framework already has the "caller" server name in the plug-in structure. So, instead of considering the default linked_ace_server as NULL, we now assume the local server name as default.
Note that if linked_ace_server is configured in cthttpd.json, it will overwrite this local server name as default.