Embed Kong in OpenResty
If you are running your own OpenResty servers, you can embed Kong Gateway by including the Kong Gateway Nginx sub-configuration using the include
directive. If you have an existing Nginx configuration, you can include the Kong Gateway-specific portion of the configuration which is output by Kong Gateway in a separate nginx-kong.conf
file:
# my_nginx.conf
# ...your nginx settings...
http {
include 'nginx-kong.conf';
# ...your nginx settings...
}
Then start your Nginx instance:
nginx -p /usr/local/openresty -c my_nginx.conf
Kong will be running in that instance as configured in nginx-kong.conf
.