server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; location /invitation/ { proxy_pass http://backend:3000; proxy_http_version 1.1; 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; } location /api/ { proxy_pass http://backend:3000; 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_cache_bypass $http_upgrade; proxy_request_buffering off; client_max_body_size 300M; proxy_read_timeout 300s; proxy_send_timeout 300s; } location /uploads/ { proxy_pass http://backend:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; client_max_body_size 10M; } location = /gallery { try_files $uri /index.html; } location = /gallery/ { try_files $uri /index.html; } location /gallery/ { proxy_pass http://backend:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; client_max_body_size 300M; } location /member-slides/ { proxy_pass http://backend:3000; proxy_http_version 1.1; 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_request_buffering off; proxy_buffering off; client_max_body_size 300M; proxy_read_timeout 300s; proxy_send_timeout 300s; } location / { try_files $uri $uri/ /index.html; } }