GSTT-CSC / XNAT

Tracks general documentation, standard operating procedures (SOP) and helper scripts for XNAT.
15 stars 0 forks source link

Reverse proxy to host multiple apps on headnode #22

Open laurencejackson opened 2 years ago

laurencejackson commented 2 years ago

Since we host multiple applications on the headnode it would be easier to access non-XNAT applications if we could direct HTTP traffic on the headnode to multiple apps. We can do this by placing a reverse proxy such as nginx on the default HTTP ports 80/443 and redirecting based on the given URL.

We have requested a number of different URLs to be added to the GSTT DNS to facilitate accessing certain applications, such as the radiation safety URLs. We have also requested a generic csc.gstt.nhs.uk DNS entry so we can redirect to different applications using subdomains, this means we won't need to update the GSTT DNS every time we add/remove an application.

The diagram below shows this schematically: image

We will still have the sp-pr-flipml01 URL which can redirect through nginx to XNAT, so no process changes should be needed.

@dangerdika, @hshuaib90, @heyhaleema, can you see any issues with this approach? Ideally we would set up a test proxy first before modifying XNAT. I think we could do this on the dgx which has equivalent networking (but no DNS entry currently) or we could do it on a different head node port.

dbeasley1 commented 2 years ago

XNAT (a tomcat web app) runs as part of a docker stack - one of the containers is Nginx acting as a reverse proxy. If installing nginx on the actual server, and have a lot of subdomains, you'd have to remove nginx from XNAT docker stack, which is easy to do.