Running TigerGraph from a subfolder with HTTPS offloading

I’m trying to run GraphStudio 3.1.6 as part of a docker swarm of apps, so we have HTTPS offloading and routing all web apps through an NGINX reverse proxy, so I’m trying to run GraphStudio from a subfolder, e.g. https:///cluster1/apps/graphstudio, but all it comes up with is a blank page and the base url is always /, whether I set the Host in the TigerGraph Admin or not.

The external reverse proxy is set up as follows:

location /cluster1/apps/graphstudio/ {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_http_version 1.1;
proxy_read_timeout 300;
proxy_cache_bypass $http_upgrade;

Any advice on any setting in the app to change the base URL folder would be greatly appreciated.




Got it working with some NGINX hacks, firstly by modifying the base Host url, and then correcting the errors in the links caused by the javascript not fully respecting the base URL. proxy_set_header Accept-Encoding “”; is needed as gzip compression is enabled by default, causing the sub_filters to not work.

…in the above location:

proxy_set_header Accept-Encoding "";
rewrite /cluster1/apps/graphstudio/cluster1/apps/graphstudio/(.*) /$1  break;     
sub_filter_types *;
sub_filter_once off;    
sub_filter href=\"/\" href=\"/cluster1/apps/graphstudio/\";
sub_filter "/api/" "/cluster1/apps/graphstudio/api/";
sub_filter "/assets/" "/cluster1/apps/graphstudio/assets/";

and then a new location:

location /cluster1/cluster1/apps/graphstudio/assets/ {
proxy_set_header Accept-Encoding “”;

1 Like

@emacinnes many thanks for coming back and updating the community on the resolution!

Unfortunately, I don’t have too much experience in docker swarm implementations so this is really great that you were able to provide some fixes to make it work. Super valuable to the community! If you run into any further issues please let us know!!

Again many thanks :pray: