# This is a custom nginx configuration template for Kong specs pid pids/nginx.pid; # mandatory even for custom config templates > if wasm and wasm_dynamic_module then load_module $(wasm_dynamic_module); > end error_log ${{PROXY_ERROR_LOG}} ${{LOG_LEVEL}}; # injected nginx_main_* directives > for _, el in ipairs(nginx_main_directives) do $(el.name) $(el.value); > end > if database == "off" then lmdb_environment_path ${{LMDB_ENVIRONMENT_PATH}}; lmdb_map_size ${{LMDB_MAP_SIZE}}; > if lmdb_validation_tag then lmdb_validation_tag $(lmdb_validation_tag); > end > end events { # injected nginx_events_* directives > for _, el in ipairs(nginx_events_directives) do $(el.name) $(el.value); > end } > if wasm then wasm { > for _, el in ipairs(nginx_wasm_main_shm_kv_directives) do shm_kv $(el.name) $(el.value); > end > for _, module in ipairs(wasm_modules_parsed) do module $(module.name) $(module.path); > end > for _, el in ipairs(nginx_wasm_main_directives) do > if el.name == "shm_kv" then shm_kv * $(el.value); > else $(el.name) $(el.value); > end > end > if #nginx_wasm_wasmtime_directives > 0 or wasmtime_cache_config_file then wasmtime { > if wasmtime_cache_config_file then cache_config $(quote(wasmtime_cache_config_file)); > end > for _, el in ipairs(nginx_wasm_wasmtime_directives) do flag $(el.name) $(el.value); > end } > end -- wasmtime > if #nginx_wasm_v8_directives > 0 then v8 { > for _, el in ipairs(nginx_wasm_v8_directives) do flag $(el.name) $(el.value); > end } > end -- v8 > if #nginx_wasm_wasmer_directives > 0 then wasmer { > for _, el in ipairs(nginx_wasm_wasmer_directives) do flag $(el.name) $(el.value); > end } > end -- wasmer } > end > if role == "control_plane" or #proxy_listeners > 0 or #admin_listeners > 0 or #status_listeners > 0 then http { include 'nginx-kong.conf'; include '*http.test.conf'; } > end > if #stream_listeners > 0 or cluster_ssl_tunnel then stream { include 'nginx-kong-stream.conf'; include '*stream.test.conf'; } > end