From 1ab0264f14e4d9b9b966f20325f54c2529906835 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:19:38 +0100 Subject: [PATCH 1/4] if the dashboard folder is missing warn the user during provision --- provision/provision-dashboard.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/provision/provision-dashboard.sh b/provision/provision-dashboard.sh index 5af2f239b..8052ca137 100755 --- a/provision/provision-dashboard.sh +++ b/provision/provision-dashboard.sh @@ -6,6 +6,11 @@ REPO=$1 BRANCH=${2:-master} DIR="/srv/www/default/dashboard" +if [[ ! -f /srv/www/default/index.php ]]; then + vvv_warn " ! The dashboard loader index.hp file is missing!" + vvv_warn " Without this neither the default or custom dashboard will load, and you will get a HTTP 401 forbidden message. If you deleted your www folder, restore the www/default folder to fix this, 'git checkout www/default' might fix this for you." +fi + if [[ false != "dashboard" && false != "${REPO}" ]]; then noroot mkdir -p "${DIR}" # Clone or pull the resources repository From f1cb6b7cc11b72273267a6f6670732cb2228bac5 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:20:09 +0100 Subject: [PATCH 2/4] added a missing dashboard HTML file --- .../core/nginx/default-pages/nodashboard.html | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 provision/core/nginx/default-pages/nodashboard.html diff --git a/provision/core/nginx/default-pages/nodashboard.html b/provision/core/nginx/default-pages/nodashboard.html new file mode 100644 index 000000000..aba5893d1 --- /dev/null +++ b/provision/core/nginx/default-pages/nodashboard.html @@ -0,0 +1,88 @@ + + + + + Dashboard file missings + + + + +
+
+

The Dashboard Loader file is missing!

+

It looks like www/default/index.php is missing!

+

This file and the www/default folder are needed for dashboard and other parts of VVV to function. This includes tools such as xdebug info/phpmyadmin/etc.

+

You can fix this and restore the www/default folder with git checkout www/default.

+
+
+ 🚩 +
+
+ + From 89ffba0b0528a71a9c781533fe581fc9049d5b4f Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:20:33 +0100 Subject: [PATCH 3/4] when the default dashboard index.php is missing fallack to the nodashoard.html file --- provision/core/nginx/config/sites/default.conf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/provision/core/nginx/config/sites/default.conf b/provision/core/nginx/config/sites/default.conf index 764552c27..57f708148 100644 --- a/provision/core/nginx/config/sites/default.conf +++ b/provision/core/nginx/config/sites/default.conf @@ -32,10 +32,17 @@ server { root /usr/share/nginx/html; } + location = /nodashboard.html { + ssi on; + internal; + auth_basic off; + root /usr/share/nginx/html; + } + include /etc/nginx/custom-dashboard-extensions/*.conf; location / { - index index.php; + index index.php /nodashboard.html; try_files $uri $uri/ /index.php$is_args$args; } From b1e77b2cf7ef6381e0b94cd1f391552264f632be Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:25:13 +0100 Subject: [PATCH 4/4] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f45cb82d..1dcc421ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ permalink: /docs/en-US/changelog/ ## 3.14 ( 2024 TBA ) +### Enhancements + +* VVV now shows a missing dashboard page with help when `www/default/index.php` is accidentally deleted instead of a HTTP forbidden error ( #2714 ) + ## 3.13.1 ( 2024 June 16th ) ### Enhancements