From 5aa3de8c8b239112ef0ac39fd472de44172e07e1 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Wed, 4 Dec 2019 03:40:17 +0100 Subject: [PATCH] Fix wo clean --- wo/cli/plugins/clean.py | 4 ++-- wo/cli/templates/stub_status.mustache | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/wo/cli/plugins/clean.py b/wo/cli/plugins/clean.py index a0b8338..33c8bbd 100644 --- a/wo/cli/plugins/clean.py +++ b/wo/cli/plugins/clean.py @@ -78,13 +78,13 @@ class WOCleanController(CementBaseController): try: Log.info(self, "Cleaning opcache") opgui = requests.get( - "https://127.0.0.1:22222/cache/opcache/opgui.php?reset=1") + "http://127.0.0.1/cache/opcache/opgui.php?reset=1") if opgui.status_code != '200': Log.warn(self, 'Cleaning opcache failed') except Exception as e: Log.debug(self, "{0}".format(e)) Log.debug(self, "Unable hit url, " - " https://127.0.0.1:22222/cache/opcache/" + " https://127.0.0.1/cache/opcache/" "opgui.php?reset=1," " please check you have admin tools installed") Log.debug(self, "please check you have admin tools installed," diff --git a/wo/cli/templates/stub_status.mustache b/wo/cli/templates/stub_status.mustache index 82bbde7..9e6ae96 100644 --- a/wo/cli/templates/stub_status.mustache +++ b/wo/cli/templates/stub_status.mustache @@ -10,7 +10,9 @@ server { server_name 127.0.0.1 localhost; access_log off; log_not_found off; - root /var/www/html; + root /var/www/22222/htdocs; + allow 127.0.0.1; + deny all; location ~ /(stub_status|nginx_status) { stub_status on; allow 127.0.0.1; @@ -21,7 +23,16 @@ server { {{#phpconf}} location ~ /(status|ping) { include fastcgi_params; - allow 127.0.0.1; + fastcgi_pass phpstatus; + access_log off; + log_not_found off; + } + location / { + try_files $uri $uri/ /index.php$is_args$args; + } + location ~ \.php$ { + try_files $uri =404; + include fastcgi_params; deny all; fastcgi_pass phpstatus; access_log off;