Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 621bbf1

Browse files
authored
Update nginx.conf
1 parent 62dcf35 commit 621bbf1

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

nginx.conf

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,26 @@ server {
33

44
server_name localhost;
55

6-
root /var/www/html;
6+
root /usr/share/nginx/html;
7+
78
index index.html;
89

10+
# Serve the front-end application for all unmatched routes
911
location / {
10-
try_files $uri /index.html =404;
12+
try_files $uri /index.html;
1113
}
1214

13-
error_log /var/log/nginx/error.log;
14-
access_log /var/log/nginx/access.log;
15+
# Serve static files for assets
16+
location /assets/ {
17+
root /usr/share/nginx/html;
18+
expires max;
19+
add_header Cache-Control public;
20+
}
1521

16-
}
22+
# Serve certificate file directly
23+
location /certificates/ {
24+
root /usr/share/nginx/html;
25+
default_type application/octet-stream;
26+
autoindex on;
27+
}
28+
}

0 commit comments

Comments
 (0)