# Linked to /etc/nginx/nginx.conf worker_processes 1; error_log /var/nginx/error.log; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; sendfile on; tcp_nopush on; keepalive_timeout 65; client_max_body_size 2000M; gzip on; server { listen 8080; listen [::]:8080; server_name simple-chat.default.local; root /simple-chat/frontend/dist; index index.html; # Proxy specific API endpoints location /api { proxy_pass http://localhost:7000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } # Handle all other routes - serve SPA for all other paths location / { try_files $uri $uri/ /index.html; } } }