Improve Nginx service management

This commit is contained in:
VirtuBox
2019-08-27 12:32:48 +02:00
parent 378c9a4820
commit c60d4e306a
5 changed files with 40 additions and 20 deletions

View File

@@ -137,7 +137,7 @@ class WOSiteController(CementBaseController):
Log.error(self, 'could not input site name')
pargs.site_name = pargs.site_name.strip()
(wo_domain, wo_www_domain) = ValidateDomain(pargs.site_name)
wo_domain_type = GetDomainlevel(wo_domain)
wo_domain_type, wo_root_domain = GetDomainlevel(wo_domain)
wo_db_name = ''
wo_db_user = ''
wo_db_pass = ''
@@ -424,7 +424,7 @@ class WOSiteCreateController(CementBaseController):
pargs.site_name = pargs.site_name.strip()
(wo_domain, wo_www_domain) = ValidateDomain(pargs.site_name)
wo_domain_type = GetDomainlevel(wo_domain)
wo_domain_type, wo_root_domain = GetDomainlevel(wo_domain)
if not wo_domain.strip():
Log.error("Invalid domain name, "
"Provide valid domain name")
@@ -958,7 +958,7 @@ class WOSiteUpdateController(CementBaseController):
(wo_domain,
wo_www_domain, ) = ValidateDomain(pargs.site_name)
wo_site_webroot = WOVariables.wo_webroot + wo_domain
wo_domain_type = GetDomainlevel(wo_domain)
wo_domain_type, wo_root_domain = GetDomainlevel(wo_domain)
check_site = getSiteInfo(self, wo_domain)
if check_site is None:
@@ -1820,7 +1820,7 @@ class WOSiteDeleteController(CementBaseController):
pargs.site_name = pargs.site_name.strip()
(wo_domain, wo_www_domain) = ValidateDomain(pargs.site_name)
wo_domain_type = GetDomainlevel(wo_domain)
wo_domain_type, wo_root_domain = GetDomainlevel(wo_domain)
wo_db_name = ''
wo_prompt = ''
wo_nginx_prompt = ''

View File

@@ -1,4 +1,4 @@
# NGINX CONFIGURATION FOR FASTCGI_CACHE EXCEPTION - WO v3.9.7
# NGINX CONFIGURATION FOR FASTCGI_CACHE EXCEPTION - WO v3.9.8
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
# do not cache xhtml request
@@ -53,7 +53,7 @@ map $request_uri $uri_no_cache {
"~*/commande/" 1;
"~*/resetpass/" 1;
}
# mobile_prefix needed for WP-Rocket
map $http_user_agent $mobile_prefix {
default "";
"~*iphone" -mobile;
@@ -78,7 +78,14 @@ map $skip_cache $cache_uri {
default 'null cache';
}
# http_prefix needed for WP-Rocket
map $https $https_prefix {
default "";
on "-https";
}
# needed to proxy web-socket connections
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}