-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom nginx conf for kb manager
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
# Serve Angular app from /usr/share/nginx/html/browser | ||
root /usr/share/nginx/html/browser; | ||
index index.html; | ||
|
||
# Handle Angular routing | ||
location /knowledge-manager/ { | ||
try_files $uri /index.html; | ||
} | ||
|
||
# Redirect 404 errors to Angular's index.html | ||
error_page 404 /index.html; | ||
|
||
# Optional: Add cache control for static files | ||
location ~* \.(?:ico|css|js|woff2?|eot|ttf|otf|svg|png|jpg|jpeg|gif|webp|avif|mp4|webm|ogg|mp3|wav|flac|aac)$ { | ||
expires 6M; | ||
access_log off; | ||
add_header Cache-Control "public"; | ||
} | ||
} |