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:

  1. # my_nginx.conf
  2. # ...your nginx settings...
  3. http {
  4. include 'nginx-kong.conf';
  5. # ...your nginx settings...
  6. }

Then start your Nginx instance:

  1. nginx -p /usr/local/openresty -c my_nginx.conf

Kong will be running in that instance as configured in nginx-kong.conf.

More Information