gaialive commited on
Commit
6369784
·
verified ·
1 Parent(s): d1521e3

Upload 2 files

Browse files
Files changed (1) hide show
  1. client/nginx.conf +36 -63
client/nginx.conf CHANGED
@@ -1,69 +1,42 @@
1
- events {
2
- worker_connections 1024;
3
- }
4
-
5
- http {
6
- include /etc/nginx/mime.types;
7
- default_type application/octet-stream;
8
-
9
- # Log format
10
- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
11
- '$status $body_bytes_sent "$http_referer" '
12
- '"$http_user_agent" "$http_x_forwarded_for"';
13
-
14
- access_log /var/log/nginx/access.log main;
15
- error_log /var/log/nginx/error.log;
16
-
17
- sendfile on;
18
- tcp_nopush on;
19
- tcp_nodelay on;
20
- keepalive_timeout 65;
21
- types_hash_max_size 2048;
22
-
23
- # Include MIME types
24
- include /etc/nginx/mime.types;
25
- default_type application/octet-stream;
26
-
27
- # Server block
28
- server {
29
- listen 80;
30
- server_name localhost;
31
-
32
- # Serve static files
33
- location / {
34
- root /usr/share/nginx/html;
35
- index index.html index.htm;
36
- try_files $uri $uri/ /index.html;
37
- }
38
 
39
- # Proxy API requests to the backend (same container)
40
- location /api/ {
41
- proxy_pass http://localhost:3001;
42
- proxy_http_version 1.1;
43
- proxy_set_header Upgrade $http_upgrade;
44
- proxy_set_header Connection 'upgrade';
45
- proxy_set_header Host $host;
46
- proxy_set_header X-Real-IP $remote_addr;
47
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
48
- proxy_set_header X-Forwarded-Proto $scheme;
49
- proxy_cache_bypass $http_upgrade;
50
- }
51
 
52
- # Health check endpoint
53
- location /health {
54
- access_log off;
55
- return 200 "healthy\n";
56
- add_header Content-Type text/plain;
57
- }
58
 
59
- error_page 404 /404.html;
60
- location = /404.html {
61
- internal;
62
- }
63
 
64
- error_page 500 502 503 504 /50x.html;
65
- location = /50x.html {
66
- root /usr/share/nginx/html;
67
- }
68
  }
69
  }
 
1
+ # Server block
2
+ server {
3
+ listen 80;
4
+ server_name localhost;
5
+
6
+ # Serve static files
7
+ location / {
8
+ root /usr/share/nginx/html;
9
+ index index.html index.htm;
10
+ try_files $uri $uri/ /index.html;
11
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
+ # Proxy API requests to the backend (same container)
14
+ location /api/ {
15
+ proxy_pass http://localhost:3001;
16
+ proxy_http_version 1.1;
17
+ proxy_set_header Upgrade $http_upgrade;
18
+ proxy_set_header Connection 'upgrade';
19
+ proxy_set_header Host $host;
20
+ proxy_set_header X-Real-IP $remote_addr;
21
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
22
+ proxy_set_header X-Forwarded-Proto $scheme;
23
+ proxy_cache_bypass $http_upgrade;
24
+ }
25
 
26
+ # Health check endpoint
27
+ location /health {
28
+ access_log off;
29
+ return 200 "healthy\n";
30
+ add_header Content-Type text/plain;
31
+ }
32
 
33
+ error_page 404 /404.html;
34
+ location = /404.html {
35
+ internal;
36
+ }
37
 
38
+ error_page 500 502 503 504 /50x.html;
39
+ location = /50x.html {
40
+ root /usr/share/nginx/html;
 
41
  }
42
  }