muthuk2 commited on
Commit
5432d94
·
verified ·
1 Parent(s): 4489808

feat: Nginx config for frontend SPA routing

Browse files
Files changed (1) hide show
  1. frontend/nginx.conf +16 -0
frontend/nginx.conf ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ server {
2
+ listen 80;
3
+ server_name _;
4
+ root /usr/share/nginx/html;
5
+ index index.html;
6
+
7
+ location / {
8
+ try_files $uri $uri/ /index.html;
9
+ }
10
+
11
+ location /api {
12
+ proxy_pass http://backend:8000;
13
+ proxy_set_header Host $host;
14
+ proxy_set_header X-Real-IP $remote_addr;
15
+ }
16
+ }