Skip to content

Commit f82819a

Browse files
committed
fix: add nginx configuration file
1 parent 92900d9 commit f82819a

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

nginx/nginx.conf

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
server {
2+
listen 80;
3+
4+
# Root directory for all files
5+
root /usr/share/nginx/html;
6+
index index.html;
7+
8+
# Enable directory listing for debugging
9+
autoindex on;
10+
11+
# Default route for root
12+
location = / {
13+
try_files /index.html =404;
14+
}
15+
16+
# Handle version-specific routes
17+
location ~ ^/v[0-9]+\.[0-9]+\.[0-9]+(/.*)?$ {
18+
try_files $uri $uri/index.html $uri/ =404;
19+
}
20+
21+
# Handle all other routes
22+
location / {
23+
try_files $uri $uri/ /index.html =404;
24+
}
25+
26+
error_page 404 /404.html;
27+
error_page 500 502 503 504 /50x.html;
28+
29+
location = /404.html {
30+
internal;
31+
}
32+
33+
location = /50x.html {
34+
internal;
35+
}
36+
}

0 commit comments

Comments
 (0)