HistomicsUI icon indicating copy to clipboard operation
HistomicsUI copied to clipboard

HistomicsUI doesnt show/load Image using nginx reverse proxy for girder.

Open Arnob-98 opened this issue 1 year ago • 7 comments

Hi, I am stuck while deplying histomicsUI with girder . I have installed histomicsUI plugin in girder, then i have configured nginx reverse proxy for my server to be visible on my local network. However when I open an image using HistomicsUI on remote computer, I could see the UI loads but no images or annotation panel is being shown. This is not a problem on my local device where it works perfectly. I am not exactly sure why as i am quite new to this. this is my nginx server plugin

server {
  listen 80;
  listen [::]:80 ipv6only=on;
  root /usr/share/nginx/html;
  index index.html index.htm;

  server_name localhost;

  location / {
    allow all;

    # Disable nginx access logs for this location
    access_log on;

    # Set the root directory for this location
    root ~/Downloads/;
    try_files $uri $uri/ =404;
  }
  location /girder/ {
    allow all;
    access_log on;
    proxy_set_header Host $proxy_host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_pass http://0.0.0.0:8080/;
    # Must set the following for SSE notifications to work
    proxy_buffering off;
    proxy_cache off;
    proxy_set_header Connection '';
    proxy_http_version 1.1;
    chunked_transfer_encoding off;
    proxy_read_timeout 600s;
    proxy_send_timeout 600s;
  }
  client_max_body_size 500M;
}

and my girder config

[global]
server.socket_host = "0.0.0.0"
tools.proxy.on = True

[server]
api_root = "/api/v1"
static_public_path = "/static"

Thanks a lot and Great work btw.

Arnob-98 avatar Aug 11 '23 17:08 Arnob-98

here's my current config for one of my servers

server { listen 80 default_server; listen [::]:80 default_server;

    server_name digitalslidearchive.fully.qualified.server.name;
    client_max_body_size 500M;

    add_header Strict-Transport-Security "max-age=31536000;

includeSubDomains" always; add_header X-Frame-Options DENY;

location / { proxy_set_header Host $proxy_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://localhost:8080/; proxy_buffering off; proxy_cache off; proxy_set_header Connection ''; proxy_http_version 1.1; chunked_transfer_encoding off; proxy_read_timeout 600s; proxy_send_timeout 600s; # proxy_request_buffering option only works on nginx >= 1.7.11 # but is necessary to support streaming requests proxy_request_buffering off; }

listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/DVcert/fullchain.pem; # managed

by Certbot ssl_certificate_key /etc/letsencrypt/live/DVcert/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

NOTE THE STUFF AT THE VERY BOTTOM RE: 443 was inserted by certbot when i set up my certificates..) The only thing I changed otherwise was

      server_name digitalslidearchive.fully.qualified.server.name;  <<<

That's not a real HOSTNAME :-)

also I use certbot-nginx plugin 99% of the time to deal with the SSL setup..

On Fri, Aug 11, 2023 at 1:48 PM Arnob-98 @.***> wrote:

Hi, I am stuck while deplying histomicsUI with girder . I have installed histomicsUI plugin in girder, then i have configured nginx reverse proxy for my server to be visible on my local network. However when I open an image using HistomicsUI on remote computer, I could see the UI loads but no images or annotation panel is being shown. This is not a problem on my local device where it works perfectly. I am not exactly sure why as i am quite new to this. this is my nginx server plugin

server { listen 80; listen [::]:80 ipv6only=on; root /usr/share/nginx/html; index index.html index.htm;

server_name localhost;

location / { allow all;

# Disable nginx access logs for this location
access_log on;

# Set the root directory for this location
root ~/Downloads/;
try_files $uri $uri/ =404;

} location /girder/ { allow all; access_log on; proxy_set_header Host $proxy_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://0.0.0.0:8080/; # Must set the following for SSE notifications to work proxy_buffering off; proxy_cache off; proxy_set_header Connection ''; proxy_http_version 1.1; chunked_transfer_encoding off; proxy_read_timeout 600s; proxy_send_timeout 600s; } client_max_body_size 500M; }

and my girder config

[global] server.socket_host = "0.0.0.0" tools.proxy.on = True

[server] api_root = "/api/v1" static_public_path = "/static"

Thanks a lot and Great work btw.

— Reply to this email directly, view it on GitHub https://github.com/DigitalSlideArchive/HistomicsUI/issues/326, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFODTXMVGOLIY5GY2DOG43XUZWABANCNFSM6AAAAAA3NHD2U4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- David A Gutman, M.D. Ph.D. Associate Professor of Pathology Emory University School of Medicine

dgutman avatar Aug 11 '23 17:08 dgutman

here's my current config for one of my servers server { listen 80 default_server; listen [::]:80 default_server; server_name digitalslidearchive.fully.qualified.server.name; client_max_body_size 500M; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; add_header X-Frame-Options DENY; location / { proxy_set_header Host $proxy_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://localhost:8080/; proxy_buffering off; proxy_cache off; proxy_set_header Connection ''; proxy_http_version 1.1; chunked_transfer_encoding off; proxy_read_timeout 600s; proxy_send_timeout 600s; # proxy_request_buffering option only works on nginx >= 1.7.11 # but is necessary to support streaming requests proxy_request_buffering off; } listen [::]:443 ssl ipv6only=on; # managed by Certbot listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/DVcert/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/DVcert/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } NOTE THE STUFF AT THE VERY BOTTOM RE: 443 was inserted by certbot when i set up my certificates..) The only thing I changed otherwise was server_name digitalslidearchive.fully.qualified.server.name; <<< That's not a real HOSTNAME :-) also I use certbot-nginx plugin 99% of the time to deal with the SSL setup.. On Fri, Aug 11, 2023 at 1:48 PM Arnob-98 @.> wrote: Hi, I am stuck while deplying histomicsUI with girder . I have installed histomicsUI plugin in girder, then i have configured nginx reverse proxy for my server to be visible on my local network. However when I open an image using HistomicsUI on remote computer, I could see the UI loads but no images or annotation panel is being shown. This is not a problem on my local device where it works perfectly. I am not exactly sure why as i am quite new to this. this is my nginx server plugin server { listen 80; listen [::]:80 ipv6only=on; root /usr/share/nginx/html; index index.html index.htm; server_name localhost; location / { allow all; # Disable nginx access logs for this location access_log on; # Set the root directory for this location root ~/Downloads/; try_files $uri $uri/ =404; } location /girder/ { allow all; access_log on; proxy_set_header Host $proxy_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://0.0.0.0:8080/; # Must set the following for SSE notifications to work proxy_buffering off; proxy_cache off; proxy_set_header Connection ''; proxy_http_version 1.1; chunked_transfer_encoding off; proxy_read_timeout 600s; proxy_send_timeout 600s; } client_max_body_size 500M; } and my girder config [global] server.socket_host = "0.0.0.0" tools.proxy.on = True [server] api_root = "/api/v1" static_public_path = "/static" Thanks a lot and Great work btw. — Reply to this email directly, view it on GitHub <#326>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFODTXMVGOLIY5GY2DOG43XUZWABANCNFSM6AAAAAA3NHD2U4 . You are receiving this because you are subscribed to this thread.Message ID: @.> -- David A Gutman, M.D. Ph.D. Associate Professor of Pathology Emory University School of Medicine

Thanks for your rapid reply. Unfortunately it doesnt fix the issue, here is the modified config file, Note that I am using My public Ip, not a domain name.

server {
        listen 80;
        listen [::]:80;


        server_name my_public_ip;
        client_max_body_size 500M;

        add_header Strict-Transport-Security "max-age=31536000;
        includeSubDomains" always;
        add_header X-Frame-Options DENY;

 location / {
    proxy_set_header Host $proxy_host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_pass http://0.0.0.0:8080/;
    proxy_buffering off;
    proxy_cache off;
    proxy_set_header Connection '';
    proxy_http_version 1.1;
    chunked_transfer_encoding off;
    proxy_read_timeout 600s;
    proxy_send_timeout 600s;
    # proxy_request_buffering option only works on nginx >= 1.7.11
    # but is necessary to support streaming requests
    proxy_request_buffering off;
        }




    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/nginx/ssl/nginx-selfsigned.crt;
    ssl_certificate_key /etc/nginx/ssl/nginx-selfsigned.key;

    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

}

also I have noticed while i open the image using OpenSeaDragon inside girder, The image is being shown, but when using GeoJs it doest work. Since HistomicsUI uses geojs as its default image viewer, the problem could be related to that, I'm not really sure.

Arnob-98 avatar Aug 12 '23 08:08 Arnob-98

Okay, It turns out that only firefox works properly with geojs, all the other browser doesnt load image in HistomicsUI, any idea why its happening?

Arnob-98 avatar Aug 12 '23 14:08 Arnob-98

Weird.. are you using Mac or Windows or Linux? I'll test it out.. probably one of our libraries has a new dependency that broke something.

On Sat, Aug 12, 2023, 10:11 AM Arnob-98 @.***> wrote:

Okay, It turns out that only firefox works properly with geojs, all the other browser doesnt load image in HistomicsUI, any idea why its happening?

— Reply to this email directly, view it on GitHub https://github.com/DigitalSlideArchive/HistomicsUI/issues/326#issuecomment-1675933911, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFODTVVWE2GO5MGBJALXY3XU6FKDANCNFSM6AAAAAA3NHD2U4 . You are receiving this because you commented.Message ID: @.***>

dgutman avatar Aug 12 '23 14:08 dgutman

I am using on Windows 11 , but the server is running on linux,(Ubuntu-18.04)

Arnob-98 avatar Aug 12 '23 15:08 Arnob-98

Any Update,sir?

Arnob-98 avatar Aug 29 '23 04:08 Arnob-98

We test the proxy settings as part of the digital_slide_archive CI -- see the files in https://github.com/DigitalSlideArchive/digital_slide_archive/tree/master/.circleci for the exact options used. We use this in our reference deployment at https://demo.kitware.com/histomicstk/.

manthey avatar Aug 31 '23 19:08 manthey

Closing this. Please reopen if needed.

manthey avatar May 22 '24 18:05 manthey