server { listen 80; server_name _; # display real ip in nginx logs when connected through reverse proxy via docker network real_ip_header X-Forwarded-For; real_ip_recursive on; client_max_body_size 32k; location / { root /usr/share/nginx/html; index index.html; } location /api { proxy_pass http://localhost:5000; proxy_redirect off; 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_set_header X-Requested-With $http_x_requested_with; proxy_headers_hash_max_size 512; proxy_headers_hash_bucket_size 128; client_body_buffer_size 128k; proxy_connect_timeout 60; proxy_send_timeout 300; proxy_read_timeout 300; proxy_buffers 32 8k; proxy_request_buffering off; } location = /favicon.ico { alias /usr/share/nginx/s.72.lv/static/favicon.ico; } }