The resolver 127.0.0.11 directive caused ECONNREFUSED errors in this network setup. Direct proxy_pass resolves server at startup which is sufficient since depends_on ensures server is running first. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
524 B
Nginx Configuration File
25 lines
524 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://server:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
client_max_body_size 20M;
|
|
}
|
|
|
|
location /uploads/ {
|
|
proxy_pass http://server:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
}
|
|
}
|