Understand the default configuration
Kong configuration file
Kong’s configuration properties are set in /opt/bitnami/apps/kong/conf/kong.conf. The most important properties are:
- database: This is the datastore used by Kong, and it is fundamental for setting a Kong cluster. The default image uses Cassandra as its default provider.
- proxy_listen: This is the address at which Kong’s proxy will listen. Even though its default value is 0.0.0.0:8000, open the corresponding port in order to allow remote requests.
- admin_listen: This is the address at which Kong’s administration interface will listen for requests. Its default value is 127.0.0.1:8001 (and 127.0.0.1:8444 for SSL), and you will need to SSH your instance in order to access it.
- cluster: All the properties starting with cluster (such as cluster_encrypt_key or cluster_listen) are important when configuring Kong in cluster mode.
If you modify your configuration file, do not forget to restart Kong:
$ sudo /opt/bitnami/ctlscript.sh restart kong # Restart Kong
Kong also allows setting configuration via environment variables (which override the contents of kong.conf). You can set them in /opt/bitnami/scripts/setenv.sh.
Find a full reference of the different configuration properties in the configuration reference in Kong’s site.
Kong ports
- Port 80: Welcome page.
- Port 8000: Kong API forward port.
- Port 8001: Kong admin API port. Only connections from localhost are permitted.
Kong log file
-
Kong log files are created at:
- /opt/bitnami/apps/server/logs/access.log
- /opt/bitnami/apps/server/logs/admin_access.log
- /opt/bitnami/apps/server/logs/error.log
-
Cassandra log file: /opt/bitnami/cassandra/log/system.log.