-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
92 lines (79 loc) 路 2.42 KB
/
Copy pathnginx.conf
File metadata and controls
92 lines (79 loc) 路 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
# Define upstream for Socket.IO backend
upstream socket_io_backend {
server 127.0.0.1:3030;
}
server {
listen 80;
location /internal-api/ {
client_max_body_size 2048m;
proxy_pass http://socket_io_backend/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Cookie $http_cookie;
proxy_redirect off;
proxy_request_buffering off;
proxy_buffering off;
proxy_read_timeout 86400;
proxy_send_timeout 86400;
} location /_next/static/ {
alias /usr/share/nginx/html/_next/static/;
expires 1y;
add_header Cache-Control "public, immutable";
}
# Serve static files from public folder (images, etc.)
location /headshot.jpg {
alias /usr/share/nginx/html/headshot.jpg;
expires 1y;
add_header Cache-Control "public, immutable";
}
location /aesthetic-images/ {
alias /usr/share/nginx/html/aesthetic-images/;
expires 1y;
add_header Cache-Control "public, immutable";
}
location /images/ {
alias /usr/share/nginx/html/images/;
expires 1y;
add_header Cache-Control "public, immutable";
}
location /ico/ {
alias /usr/share/nginx/html/ico/;
expires 1y;
add_header Cache-Control "public, immutable";
}
location /svg/ {
alias /usr/share/nginx/html/svg/;
expires 1y;
add_header Cache-Control "public, immutable";
}
location /pdf/ {
alias /usr/share/nginx/html/pdf/;
expires 1y;
add_header Cache-Control "public, immutable";
}
location / {
proxy_pass http://localhost:3001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Cookie $http_cookie;
proxy_redirect off;
proxy_buffering off;
}
}
}