diff --git a/CHANGELOG.md b/CHANGELOG.md index 19c35bddd..2376c4c2b 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 ) + ### Bug Fixes * VVV will check if Docker is installed before defaulting to it on Arm64/Apple Silicon ( #2715 ) 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; } 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.

+
+
+ 🚩 +
+
+ + 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