From be779448951f8c660abb503619852687cb013709 Mon Sep 17 00:00:00 2001 From: thehrz Date: Tue, 3 Oct 2023 20:53:45 +0800 Subject: [PATCH] feat: add 404 page --- nginx/conf.d/root.conf | 2 ++ src/components/button.vue | 8 ++------ src/pages/404.vue | 12 ++++++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 src/pages/404.vue diff --git a/nginx/conf.d/root.conf b/nginx/conf.d/root.conf index 08b1fa2..5aeb735 100644 --- a/nginx/conf.d/root.conf +++ b/nginx/conf.d/root.conf @@ -11,6 +11,8 @@ server { gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/javascript application/json; gzip_disable "MSIE [1-6]\."; gzip_vary on; + + error_page 404 /404.html; location / { root /usr/local/nginx/html/; diff --git a/src/components/button.vue b/src/components/button.vue index 6a94ab8..62116f1 100644 --- a/src/components/button.vue +++ b/src/components/button.vue @@ -11,12 +11,8 @@ diff --git a/src/pages/404.vue b/src/pages/404.vue new file mode 100644 index 0000000..4e6fefe --- /dev/null +++ b/src/pages/404.vue @@ -0,0 +1,12 @@ + + +