nginx's default client_max_body_size is 1 MB, so a phone photo (3-5 MB) uploaded as a product image or customer-display image was refused with 413 before it reached the backend. The proxy (both copies, CS-5) and the waiter, manager and terminal images now allow 250 MB; the backend checks the real limits (media library: 20 MB pictures, 200 MB videos, step 5.1). All five configs pass `nginx -t`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
950 B
Nginx Configuration File
32 lines
950 B
Nginx Configuration File
# Terminal image (plan step 3.1b): the static app + /api and /static forwarded to the backend.
|
|
# Reached through the proxy on :8082 (LAN only). Same as the manager's image.
|
|
# Uploads: the media library takes pictures up to 20 MB and videos up to 200 MB
|
|
# (local_backend/services/media.py checks the real limits; nginx's default is 1 MB).
|
|
client_max_body_size 250m;
|
|
|
|
server {
|
|
listen 80;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location /api/ {
|
|
proxy_pass http://backend:8000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_read_timeout 3600;
|
|
}
|
|
|
|
location /static/ {
|
|
proxy_pass http://backend:8000/static/;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|