diff --git a/ts/smartnginx.snippets.ts b/ts/smartnginx.snippets.ts index b253bcd..7f390f3 100644 --- a/ts/smartnginx.snippets.ts +++ b/ts/smartnginx.snippets.ts @@ -78,6 +78,15 @@ export let getHostConfigString = (hostNameArg: string, destinationIpArg: string, server ${destinationIpArg}:${destinationPortArg}; } + server { + # The keepalive parameter sets the maximum number of idle keepalive connections + # to upstream servers that are preserved in the cache of each worker process. When + # this number is exceeded, the least recently used connections are closed. + listen *:80 ; + server_name ${hostNameArg}; + rewrite ^ https://${hostNameArg}$request_uri? permanent; + } + server { listen *:443 ssl; server_name ${hostNameArg};