I have a web site running on a docker container - where I want to hide behind NGINX LBA docker container.
I started the web container and I can use curl to retrieve the index.html page the page retrieve .css, .js .html files by calling itself
When I use the LBA and location / it works – but when I try to add a subfolder the web site calling the LBA fails to find resources (like .js .css .html) because of the subfolder
(see image attached)
When fleet-ui is behind NGINX LBA:
I have a web site running on a docker container - where I want to hide behind NGINX LBA docker container. I started the web container and I can use curl to retrieve the index.html page the page retrieve .css, .js .html files by calling itself When I use the LBA and location / it works – but when I try to add a subfolder the web site calling the LBA fails to find resources (like .js .css .html) because of the subfolder (see image attached)
Example: I start a container running fleet-ui (https://github.com/purpleworks/fleet-ui) which expose the port 3000
When calling https://trust-authority-private.saas.lab/ui/#/
I get and error because the browse tries to retrieve https://trust-authority-private.saas.lab/views/layout.html?_cache=1440910986132633128 https://trust-authority-private.saas.lab/views/main.html?_cache=1440910986132633128 notice the missing sub-folder /ui/
I started nginx plus /and also nginx with the following nginx configuration:
worker_processes 4;
events { worker_connections 1024; }
http { include /etc/nginx/mime.types; default_type application/octet-stream;
}
Inside /etc/nginx/location I added the following fleet-ui.conf location ~ ^/ui/.*$ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_set_header Connection "Keep-Alive"; proxy_set_header Proxy-Connection "Keep-Alive"; proxy_http_version 1.1;
}