Commit 5df2f7bb authored by jose's avatar jose

Fix the problem that the reverse proxy setting does not take effect

parent 77584bd5
...@@ -175,8 +175,8 @@ class panelSite(panelRedirect): ...@@ -175,8 +175,8 @@ class panelSite(panelRedirect):
#SSL-END #SSL-END
#ERROR-PAGE-START %s #ERROR-PAGE-START %s
error_page 404 /404.html; #error_page 404 /404.html;
error_page 502 /502.html; #error_page 502 /502.html;
#ERROR-PAGE-END #ERROR-PAGE-END
#PHP-INFO-START %s #PHP-INFO-START %s
...@@ -2528,10 +2528,10 @@ server ...@@ -2528,10 +2528,10 @@ server
if public.get_webserver() == 'nginx': if public.get_webserver() == 'nginx':
shutil.copyfile(ng_file, '/tmp/ng_file_bk.conf') shutil.copyfile(ng_file, '/tmp/ng_file_bk.conf')
if os.path.exists('/www/server/nginx/src/ngx_cache_purge'): #if os.path.exists('/www/server/nginx/src/ngx_cache_purge'):
cureCache += ''' cureCache += '''
location ~ /purge(/.*) { location ~ /purge(/.*) {
proxy_cache_purge cache_one $1$is_args$args; proxy_cache_purge cache_one $host$1$is_args$args;
#access_log /www/wwwlogs/%s_purge_cache.log; #access_log /www/wwwlogs/%s_purge_cache.log;
}''' % (get.sitename) }''' % (get.sitename)
if os.path.exists(ng_file): if os.path.exists(ng_file):
...@@ -2565,7 +2565,7 @@ server ...@@ -2565,7 +2565,7 @@ server
rep = "location.+\(gif[\w\|\$\(\)\n\{\}\s\;\/\~\.\*\\\\\?]+access_log\s+/" rep = "location.+\(gif[\w\|\$\(\)\n\{\}\s\;\/\~\.\*\\\\\?]+access_log\s+/"
ng_conf = re.sub(rep, 'access_log /', ng_conf) ng_conf = re.sub(rep, 'access_log /', ng_conf)
ng_conf = ng_conf.replace("include enable-php-","%s\n" % public.GetMsg("CLEAR_CACHE") +cureCache +"\n\t%s\n\t" % public.GetMsg("NGINX_PROXY_REP") + "include " + ng_proxyfile + ";\n\n\tinclude enable-php-") ng_conf = ng_conf.replace("include enable-php-","%s\n" % public.GetMsg("CLEAR_CACHE") +cureCache +"\n\t%s\n\t" % public.GetMsg("NGINX_PROXY_REP") + "include " + ng_proxyfile + ";\n\n\tinclude enable-php-")
public.writeFile(ng_file,ng_conf) #public.writeFile(ng_file,ng_conf)
else: else:
rep = "%s[\w\s\~\/\(\)\.\*\{\}\;\$\n\#]+.{66,66}\n+[\s\w\/\*\.\;]+include enable-php-" % public.GetMsg("CLEAR_CACHE") rep = "%s[\w\s\~\/\(\)\.\*\{\}\;\$\n\#]+.{66,66}\n+[\s\w\/\*\.\;]+include enable-php-" % public.GetMsg("CLEAR_CACHE")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment