Galaxy with Reverse Proxy?

I asked the Bing AI chatbot this question:

I have a JavaScript web application. A possible client is asking me if I could serve a white label version of my application from a subdomain of their own domain. Is there a way to redirect from their subdomain to my domain, but still show only their sub domain in the URL bar?

Bing responded:

There are a few ways to redirect from a subdomain to a domain, but still show only the subdomain in the URL bar. One of them is to use a reverse proxy, which is a server that acts as an intermediary between the client and the origin server. A reverse proxy can forward requests from the subdomain to your domain, and return the responses back to the client, without revealing the actual origin serverā€™s address.

To set up a reverse proxy, you will need to have access to the DNS settings of the subdomain, and a web server that can handle reverse proxying, such as Apache or nginx. You will also need to configure your web server to accept requests from the subdomain, and to forward them to your domain. You can find some examples of how to do this in the web search resultsĀ¹Ā².

Another option is to use a white label service, which is a third-party platform that allows you to customize and host your web application under a different domain or subdomain. A white label service can take care of the DNS settings, SSL certificates, and hosting for you, so you donā€™t have to worry about setting up a reverse proxy or managing your own server. You can find some examples of white label services in the web search resultsĀ³ā“.

I hope this helps you understand how to serve a white label version of your web application from a subdomain of your clientā€™s domain. If you have any other questions, please feel free to ask me. :blush:

Source: Conversation with Bing, 8/6/2023
(1) [SOLVED] Redirect a subdomain to a different internal web application ā€¦ https://community.spiceworks.com/topic/2017348-redirect-a-subdomain-to-a-different-internal-web-application-server-help.
(2) How do I route a subdomain to an application running on my homeserver ā€¦ https://superuser.com/questions/1656006/how-do-i-route-a-subdomain-to-an-application-running-on-my-homeserver-on-a-speci.
(3) How to set up a White Label Domain or Subdomain ā€“ HetrixTools. How to set up a White Label Domain or Subdomain ā€“ HetrixTools.
(4) White Label Custom Domains - SEOptimer. White Label Custom Domains - SEOptimer.

Is Bing right about this? And if so, is there a way to set this up with Galaxy?

1 Like

You can configure multiple domains in Galaxy and also in most hosting providers (zCloud, Vercel, etc).

I have ran many apps there with multiple domains. Then inside your Meteor app you can do different things by getting the host requested from the connection or request.

What is your concern?

2 Likes

Oh, Iā€™ve never tried this before, so Iā€™m just checking to find out if itā€™s possible and how to do it.

So say the client is at, e.g., client.com, and my Galaxy server is at mygalaxyserver.com. The client sets up a subdomain at coolservice.client.com. It gets served from mygalaxyserver.com, or perhaps from coolservice.mygalaxyserver.com, but the end user still sees coolservice.client.com in the URL bar.

Do I understand correctly that, that can be done?

Galaxy and all hosting solutions can deliver to many different domains.

Your containers are not attached to your requested URL or registered domain, so there is not ā€œredirectā€ or ā€œreverse proxyā€, they are just different domains sending requests to the same containers.

Behind the scene Galaxy has a custom proxy written in Go that based on the domain sends the request to your container. If there is a bug in Galaxy proxy for example the request could go to a different app. Got it?

2 Likes

This is great info. It will be very helpful in a meeting I have coming up this week.

1 Like