diff --git a/nginx/filesystem/etc/nginx/conf.d/nginx.conf b/nginx/filesystem/etc/nginx/conf.d/nginx.conf index e2e0f33..ae8f40f 100644 --- a/nginx/filesystem/etc/nginx/conf.d/nginx.conf +++ b/nginx/filesystem/etc/nginx/conf.d/nginx.conf @@ -43,13 +43,21 @@ server { #charset koi8-r; #access_log /var/log/nginx/host.access.log main; - location / { + location = / { root /usr/share/nginx/html; # First attempt to serve request as file, then # as directory, then redirect to index(angular) if no file found. try_files $uri $uri/ /index.html; } + location ~ ^/(background|user/auth|user/login(?:/desktop)?|vm-admin|twitch-bot(?:/config)?|imdb-search) { + return 404; + } + + location / { + return 404; + } + location /api/v1 { proxy_pass http://${IP_ADDRESS}:8081; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/src/src/app/app.routes.ts b/src/src/app/app.routes.ts index fb87976..234e1c3 100644 --- a/src/src/app/app.routes.ts +++ b/src/src/app/app.routes.ts @@ -17,7 +17,6 @@ export const routes: Routes = [ {path: 'user/auth', component: LoginComponent}, {path: 'user/login', component: LoginLandingComponent}, {path: 'user/login/desktop', component: LoginLandingDesktopComponent}, - {path: 'home', component: HomeComponent}, {path: 'vm-admin', component: VmManagerComponent, canActivate: [authGuard]}, {path: 'twitch-bot', component: TwitchBotIndexComponent}, {path: 'twitch-bot/config', component: TwitchBotConfigComponent},