Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
a672bb920f | |||
c3fabb6107 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartnginx",
|
"name": "@pushrocks/smartnginx",
|
||||||
"version": "2.0.19",
|
"version": "2.0.20",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartnginx",
|
"name": "@pushrocks/smartnginx",
|
||||||
"version": "2.0.19",
|
"version": "2.0.20",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "control nginx from node, TypeScript ready",
|
"description": "control nginx from node, TypeScript ready",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -74,10 +74,14 @@ export let getBaseConfigString = () => {
|
|||||||
export let getHostConfigString = (hostNameArg: string, destinationIpArg: string) => {
|
export let getHostConfigString = (hostNameArg: string, destinationIpArg: string) => {
|
||||||
let hostConfig = plugins.smartstring.indent.normalize(`
|
let hostConfig = plugins.smartstring.indent.normalize(`
|
||||||
upstream ${hostNameArg} {
|
upstream ${hostNameArg} {
|
||||||
|
keepalive 100;
|
||||||
server ${destinationIpArg};
|
server ${destinationIpArg};
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
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 ;
|
listen *:80 ;
|
||||||
server_name ${hostNameArg};
|
server_name ${hostNameArg};
|
||||||
rewrite ^ https://${hostNameArg}$request_uri? permanent;
|
rewrite ^ https://${hostNameArg}$request_uri? permanent;
|
||||||
@ -91,7 +95,6 @@ export let getHostConfigString = (hostNameArg: string, destinationIpArg: string)
|
|||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
keepalive 100;
|
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
Reference in New Issue
Block a user