Skip to content

Commit f323771

Browse files
Merge pull request #11 from zopdev/FIX-BASE-URL-CONFIG
fix the ngnix file
2 parents 04ce379 + 7cf4a25 commit f323771

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

nginx.conf

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,24 @@ events {
66
}
77

88
http {
9+
include mime.types;
10+
911
server {
10-
include mime.types;
11-
listen *:8000; # Listen for incoming connections from any interface on port 80
12-
server_name ""; # Don't worry if "Host" HTTP Header is empty or not set
13-
root /usr/share/nginx/html; # serve static files from here
12+
listen *:8000; # Listen for incoming connections from any interface on port 8000
13+
server_name ""; # Allow empty or not set "Host" HTTP Header
14+
root /usr/share/nginx/html; # Serve static files from here
15+
16+
# Redirect `/ui-components` to `/ui-components/`
17+
location = /ui-components {
18+
return 301 $scheme://$host/ui-components/;
19+
}
1420

21+
# Serve the React app under `/ui-components/`
1522
location / {
16-
try_files $uri $uri/ /index.html;
23+
try_files $uri $uri/ /index.html;
1724
}
25+
26+
# Optional health check locations
1827
# location /.well-known/health-check {
1928
# access_log off;
2029
# return 200 "healthy\n";
@@ -26,4 +35,4 @@ http {
2635
# add_header Content-Type text/plain;
2736
# }
2837
}
29-
}
38+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@
5959
"tw-colors": "^3.3.2",
6060
"webpack": "^5.95.0"
6161
},
62-
"homepage": "/ui-components"
62+
"homepage": "/ui-components/"
6363
}

0 commit comments

Comments
 (0)