From 8848c1864a7dcbaa76321ee87f23b783f31c7aa4 Mon Sep 17 00:00:00 2001 From: Globegitter Date: Tue, 2 Oct 2018 15:24:44 +0200 Subject: [PATCH] Move mainSnippet before events. --- rootfs/etc/nginx/template/nginx.tmpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl index bac17d2a7c..f024b14b0c 100644 --- a/rootfs/etc/nginx/template/nginx.tmpl +++ b/rootfs/etc/nginx/template/nginx.tmpl @@ -35,16 +35,16 @@ worker_rlimit_nofile {{ .MaxOpenFiles }}; {{/* avoid waiting too long during a reload */}} worker_shutdown_timeout {{ $cfg.WorkerShutdownTimeout }} ; +{{ if not (empty $cfg.MainSnippet) }} +{{ $cfg.MainSnippet }} +{{ end }} + events { multi_accept {{ if $cfg.EnableMultiAccept }}on{{ else }}off{{ end }}; worker_connections {{ $cfg.MaxWorkerConnections }}; use epoll; } -{{ if not (empty $cfg.MainSnippet) }} -{{ $cfg.MainSnippet }} -{{ end }} - http { {{ if not $all.DisableLua }} lua_package_cpath "/usr/local/lib/lua/?.so;/usr/lib/lua-platform-path/lua/5.1/?.so;;";