server { listen 4444 default_server; server_name _; # location / { # # Proxy pass to the app at /ohif # proxy_pass http://0.0.0.0:8000/ohif/; # 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_cache_bypass $http_upgrade; # proxy_read_timeout 86400; # proxy_redirect off; # # Handling URI # proxy_set_header X-Forwarded-Prefix "/"; # } location / { # Proxy pass to the app at /ohif proxy_pass http://0.0.0.0:8000; 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_cache_bypass $http_upgrade; proxy_read_timeout 86400; proxy_redirect off; } location /orthanc { # Serve backend from port proxy_pass http://0.0.0.0:8042; rewrite /orthanc(.*) $1 break; 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_cache_bypass $http_upgrade; proxy_read_timeout 86400; proxy_redirect off; proxy_request_buffering off; proxy_max_temp_file_size 0; client_max_body_size 0; } }