From edd6a7c938b9fd86757190149619c1a12fed583e Mon Sep 17 00:00:00 2001 From: Adam Procter <adamprocter@researchnot.es> Date: Wed, 8 Apr 2020 14:15:03 +0100 Subject: [PATCH] edits --- NGINX.md | 15 +++++++++++++++ app/src/router/index.js | 13 +++++++++---- app/src/views/NotFound.vue | 6 +++--- 3 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 NGINX.md diff --git a/NGINX.md b/NGINX.md new file mode 100644 index 0000000..fd8380e --- /dev/null +++ b/NGINX.md @@ -0,0 +1,15 @@ +server { +listen 217.147.85.104:80; +server_name \*.nodenogg.in; +root /var/www/vhosts/nodenogg.in/alpha.nodenogg.in; + +location / { +try_files $uri $uri/ /index.html; +} + +location /microcosm { +alias /var/www/vhosts/nodenogg.in/alpha.nodenogg.in; +try_files \$uri /microcosm/index.html; +} + +} diff --git a/app/src/router/index.js b/app/src/router/index.js index d0aa64b..a0608a8 100644 --- a/app/src/router/index.js +++ b/app/src/router/index.js @@ -1,7 +1,6 @@ import Vue from 'vue' import VueRouter from 'vue-router' import Home from '../views/Home.vue' -import NotFound from '../views/NotFound.vue' Vue.use(VueRouter) @@ -27,15 +26,21 @@ const routes = [ }, { + // catches 404 errors path: '*', - name: 'NotFound', - component: NotFound + name: '404', + component: () => + import( + /* webpackChunkName: "NotFoundComponent" */ '../views/NotFound.vue' + ) } ] const router = new VueRouter({ mode: 'history', - base: process.env.VUE_APP_HTTP + '://' + process.env.VUE_APP_URL + '/', + //base: 'https://alpha.nodenogg.in/', + //base: process.env.VUE_APP_HTTP + '://' + process.env.VUE_APP_URL + '', + //base: process.env.VUE_APP_HTTP, routes }) diff --git a/app/src/views/NotFound.vue b/app/src/views/NotFound.vue index 6fb7dc7..00a987f 100644 --- a/app/src/views/NotFound.vue +++ b/app/src/views/NotFound.vue @@ -1,6 +1,7 @@ <template> <div> - <p>A real 404</p> + <h1>This is a Custom 404</h1> + <p>Delightful one coming soon</p> </div> </template> @@ -8,5 +9,4 @@ export default {} </script> -<style lang="css" scoped> -</style> \ No newline at end of file +<style lang="css" scoped></style> -- GitLab