Skip to content

Commit 4106e38

Browse files
feat: changing mismatching url
1 parent 4c71760 commit 4106e38

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

nginx/filesystem/etc/nginx/conf.d/nginx.conf

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,21 @@ server {
4343
#charset koi8-r;
4444
#access_log /var/log/nginx/host.access.log main;
4545

46+
# index.html
4647
location = / {
4748
root /usr/share/nginx/html;
4849
try_files /index.html =404;
4950
}
5051

52+
# Catch-all for non-existant pages
5153
location / {
54+
return 404;
55+
}
56+
57+
# Angular pages
58+
location ~ ^/(background|user|vm-admin|twitch|imdb-search) {
5259
root /usr/share/nginx/html;
53-
try_files $uri $uri/ =404;
60+
try_files $uri $uri/ /index.html =404;
5461
}
5562

5663
location /api/v1 {
@@ -91,12 +98,6 @@ server {
9198
proxy_set_header X-Forwarded-Port $server_port;
9299
}
93100

94-
# Angular pages
95-
location ~ ^/(background|user/auth|user/login|vm-admin|twitch-bot|imdb-search) {
96-
root /usr/share/nginx/html;
97-
try_files $uri $uri/ /index.html =404;
98-
}
99-
100101
# Verification for our SSL certificate with Let's Encrypt
101102
location /.well-known {
102103
root /usr/share/nginx/html;

0 commit comments

Comments
 (0)