diff --git a/ts/smartnginx.snippets.ts b/ts/smartnginx.snippets.ts index 263b810..e8769f8 100644 --- a/ts/smartnginx.snippets.ts +++ b/ts/smartnginx.snippets.ts @@ -73,10 +73,6 @@ export let getBaseConfigString = () => { export let getHostConfigString = (hostNameArg: string, destinationIpArg: string, destinationPortArg = 80) => { const hostConfig = plugins.smartstring.indent.normalize(` - upstream ${hostNameArg} { - keepalive 100; - server ${destinationIpArg}:${destinationPortArg}; - } server { # The keepalive parameter sets the maximum number of idle keepalive connections @@ -100,7 +96,7 @@ export let getHostConfigString = (hostNameArg: string, destinationIpArg: string, proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass http://${hostNameArg}; + proxy_pass http://${destinationIpArg}:${destinationPortArg}; } } `);