server { listen 80; server_name _; # Dashboard location / { root /usr/share/nginx/html/dashboard; try_files $uri $uri/ /index.html; } # Messaging client location /messaging { alias /usr/share/nginx/html/messaging; try_files $uri $uri/ /messaging/index.html; } # API services proxy location /api/v1/weather/ { proxy_pass http://api:8000/api/v1/weather/; 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/v1/nodes { proxy_pass http://api:8000/api/v1/nodes; 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/v1/messages { proxy_pass http://gateway:8000/api/v1/messages; 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/v1/billing/ { proxy_pass http://billing:8000/api/v1/billing/; 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; } }