# nginx configuration file for Data Fair server { listen 80; server_name _; # Transmit host, protocol and user ip, we use it for routing, rate limiting, etc. proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Client-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; # web socket support proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; # accept some occasional long queries proxy_read_timeout 600s; # body size limits are implemented by services themselves client_max_body_size 0; # direct streaming of uploads proxy_request_buffering off; # direct streaming of downloads, enabled on-demand by services using x-accel-buffering header proxy_buffering off; # allow large response headers (setCookies with large session token) proxy_buffer_size 32k; # use docker resolver to resolve service names, prevents cached ip breakage at service restart resolver 127.0.0.11 valid=10s; # redirect root to /data-fair/ location = / { return 302 /data-fair/; } location /data-fair { rewrite ^/data-fair/(.*) /$1 break; proxy_pass http://data-fair:8080/; } location /simple-directory { rewrite ^/simple-directory/(.*) /$1 break; proxy_pass http://simple-directory:8080/; } location /mails { rewrite ^/mails/(.*) /$1 break; proxy_pass http://simple-directory:1080/; } location /api-doc { rewrite ^/api-doc/(.*) /$1 break; proxy_pass http://openapi-viewer:8080/; } location /capture { rewrite ^/capture/(.*) /$1 break; proxy_pass http://capture:8080/; } location /notify { rewrite ^/notify/(.*) /$1 break; proxy_pass http://notify:8080/; } location /thumbor { rewrite ^/thumbor/(.*) /$1 break; proxy_pass http://thumbor:8000/; } }