fix autoconf bug when removing config with multiple server name and increase default LIMIT_CONN_MAX for average website with HTTP2
This commit is contained in:
parent
02f9fbe5fc
commit
42b7a57f01
@ -151,13 +151,16 @@ class Config :
|
|||||||
|
|
||||||
def remove(self, vars) :
|
def remove(self, vars) :
|
||||||
try :
|
try :
|
||||||
|
# Get first server name
|
||||||
|
first_server_name = vars["SERVER_NAME"].split(" ")[0]
|
||||||
|
|
||||||
# Check if file exists
|
# Check if file exists
|
||||||
if not os.path.isfile("/etc/nginx/" + vars["SERVER_NAME"] + "/server.conf") :
|
if not os.path.isfile("/etc/nginx/" + first_server_name + "/server.conf") :
|
||||||
utils.log("[!] /etc/nginx/" + vars["SERVER_NAME"] + "/server.conf doesn't exist")
|
utils.log("[!] /etc/nginx/" + first_server_name + "/server.conf doesn't exist")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Remove the folder
|
# Remove the folder
|
||||||
shutil.rmtree("/etc/nginx/" + vars["SERVER_NAME"])
|
shutil.rmtree("/etc/nginx/" + first_server_name)
|
||||||
return True
|
return True
|
||||||
except Exception as e :
|
except Exception as e :
|
||||||
utils.log("[!] Error while deactivating config : " + str(e))
|
utils.log("[!] Error while deactivating config : " + str(e))
|
||||||
|
|||||||
@ -106,7 +106,7 @@ LIMIT_REQ_RATE="${LIMIT_REQ_RATE-1r/s}"
|
|||||||
LIMIT_REQ_BURST="${LIMIT_REQ_BURST-2}"
|
LIMIT_REQ_BURST="${LIMIT_REQ_BURST-2}"
|
||||||
LIMIT_REQ_CACHE="${LIMIT_REQ_CACHE-10m}"
|
LIMIT_REQ_CACHE="${LIMIT_REQ_CACHE-10m}"
|
||||||
USE_LIMIT_CONN="${USE_LIMIT_CONN-yes}"
|
USE_LIMIT_CONN="${USE_LIMIT_CONN-yes}"
|
||||||
LIMIT_CONN_MAX="${LIMIT_CONN_MAX-10}"
|
LIMIT_CONN_MAX="${LIMIT_CONN_MAX-50}"
|
||||||
LIMIT_CONN_CACHE="${LIMIT_CONN_CACHE-10m}"
|
LIMIT_CONN_CACHE="${LIMIT_CONN_CACHE-10m}"
|
||||||
PROXY_REAL_IP="${PROXY_REAL_IP-no}"
|
PROXY_REAL_IP="${PROXY_REAL_IP-no}"
|
||||||
PROXY_REAL_IP_FROM="${PROXY_REAL_IP_FROM-192.168.0.0/16 172.16.0.0/12 10.0.0.0/8}"
|
PROXY_REAL_IP_FROM="${PROXY_REAL_IP_FROM-192.168.0.0/16 172.16.0.0/12 10.0.0.0/8}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user