openresty/nginx proxy_pass rewrite not with potree view

60 Views Asked by At

I have openresty and node application openresty used to authenticate user using lua. here is my nginx.conf file.

When give location /potree app loading properly but when click on folders in its not opening

But when I use location / its working file. attached image for reference.

enter image description here

server {
  #  listen     80 default_server;
   listen 80;
   listen [::]:80;
   server_name localhost;
  #  root     /opt/nginx/html;
  #  resolver 127.0.0.11 valid=1s;
  #  set $session_check_ssi off;
  #  access_by_lua '
  #    local opts = {
  #      My keycloak config
  #    }
  #    -- call introspect for OAuth 2.0 Bearer Access Token validation
  #    local res, err = require("resty.openidc").authenticate(opts)
  # ';

  # I disabled caching so the browser won't cache the site.
  expires           0;
  add_header        Cache-Control private;

  location /potree {
    rewrite ^/potree(.*) /$1 break;
    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_pass http://potree:1234;

    
  }


  error_page 404 /404.html;
      location = /40x.html {
  }
  # redirect server error pages to the static page /50x.html
  error_page 500 502 503 504 /50x.html;
      location = /50x.html {
  }

}

0

There are 0 best solutions below