Multiple sub-domain with several App services in Azure - redirect

I currently have one App Service with one domain and one wildcard certificate. I have WordPress and using multiple subdomains has worked so far for schools and district. ex District1.contoso.com School1.contoso.com, School2.contoso.com.
Issue now is that the next district has new requirements but we want to use the same domain. This second district will be on a different App Service. Ex. District2.contoso.com, SchoolA.contoso.com, SchoolB.contoso.com, SchoolC.contoso.com.
We have both App Services setup, we have an *Application Gateway with rules and listners and such. We also have a Virtual Machine with IIS to do redirect from an old domain. (Ex. *.oldcontoso.com)
I can't find instructions on how to have the same domain but sub-domains pointing to different App Services. I only found pointing two different domains to two apps but this is not the case.
How do I redirect the sub-domains to different app services. (ps, I expect a repeat with other districts)

Related

Single server on multiple domains

There is only one server and a web server must be provided to more than one domain through that single server.
Also, the domain provider of each domain is different.
I don't know exactly, I'm new so there will be more than one domain, but they are not provided from the same place. A different web page will be opened with a different domain on a single server.

How to resolve endpoint for an Android app aimed at multiple customers?

First let me explain the problem:
We have an Android app and multiple customers. Each customer has their own endpoint (Kubernetes cluster of microservices basically) that the app should communicate with. To prevent us from having to deploy multiple versions of the app (one for each customer) we are looking for a solution that will use one app but allow for multiple endpoints.
I am interested in knowing if, and if so how, others have solved this.
We have tried:
Automatic endpoint resolution within the app based on user's domain. This fails our requirements because we then need to build a new app for every customer, which is not optimal with 10's of customers appearing every week.
Microservice that gives the user and endpoint based on user's domain. This fails because it creates a Catch 22 problem... how do we know the endpoint to this microservice?
Keycloak User Attributes. We use Keycloak for SSO. Using the REST API in Keycloak requires an admin user, but we do not want to expose such an admin user from any external application.
Manual endpoint insertion in the app. Highly user-unfriendly!

Box login - how do develop opn both localhost and in production?

I have:
a Node.js app that uses the Box Content API, and...
a Box app, just so I can register an Oauth2 client_id, client_secret and redirect_uri with my Box repo.
My current redirect_uri is "http:/localhost:3000". The app works fine if I run locally, It fails miserably if I deploy to Bluemix (e.g. "https://myapp.mybluemix.net").
I believe you can register multiple redirect_uris for a single Oauth2 client_id/client_secret in Facebook and Google, But I can't see any workaround in Box. Except to create a second app...
These posts are similar, but I don't need to authenticate TO a separate OAuth2 server ... I just need to authenticate FROM two different ENVIRONMENTS (my Node app locally, vs. the same Node app on Bluemix).
Facebook login - how to develop on both localhost and in production?
Using OAuth for both development and production environments
Q: Is there any way that I can register multiple redirect_uris for the same Box app?
ADDENDUM:
Thanks to Murtza Manzur for his reply:
Box does not support multiple domain redirect URIs. To use different
domains (localhost and mybluemix.net), you would have to create a
separate app for each domain.
This means I need two Box apps, and I need to configure my Bluemix/Node app to use one or the other.
Here is an excellent discussion about how to do that efficiently and securely in Bluemix:
Keeping secrets – how your cloud application should access credentials and other private data, Patrick Mueller
Box does not support multiple domain redirect URIs. To use different domains (localhost and mybluemix.net), you would have to create a separate app for each domain.

United Domains Redirect of PUT-Request doesn't work

I have a website working on Azure and I have a domain registered at united domains. The domain redirects to azure with "URL-Hiding" (means that ud simulates the server, by having a server between the user and azure). Now I figured out, that now it's not possible to send PUT-requests. United domains delivers an error page, saying that PUT requests are not allowed on their server.
Now how can I fix this? What I need is that mydomain.com/testpage shows xxx.azurewebsites.net/testpage, but it shouldn't redirects to it.
If the only way is not to use PUT-requests anymore, this would cause big restructuring in my project.
Why you use domain redirect at ISP level, rather then CNAME and A records?
You can read more here on how to use your own domain with Azure Cloud Service or Storage.
And here, you can find the article about how to configure custom domain for Azure web sites.
I would recommend to not use domain redirect with Azure Services at all!

Facebook Connect on multiple domains with centralized login

we are looking into implementing Facebook Connect on our wiki service, http://www.wikidot.com. User-created sites span the *.wikidot.com domain, but also custom domains (like mine http://michalf.me), all handled by our single service.
We have a centralized account system. Users always log in (and create accounts) at www.wikidot.com and they are automatically logged in in all subdomains (cookie domain set to .wikidot.com - easy) and custom domains (automatically, via a series of redirects).
We would like to add FC into our login flow. Now, it would be great to get some clarification about FC Terms, which suggests using one App ID for every domain. In our case however user-created sites are not separate applications.
So, is it OK to use FC on one centralized website where our users log in (on www.wikidot.com) and expand user status on other domains connected to our service? This is how it works right now, without FC.
It would be great if we could get clarification from someone from FB to make sure we will not be violating any terms or policies.
Thanks!
It isn't possible (as far as I know anyway) to use the same app ID on multiple domains. FB allows use across subdomains, but I have found some difficultly with this even at times with the cookies. When you set up an app, you are asked to provide the domain for it. The domain you put here is the only domain that your app will work for. If your users are only ever signing in on wikidot.com, then I suppose you can use what you have already to move those sessions onto the other domains, but once you are on the other domain, you won't be able to use any of the facebook api features; any requests you make will fail.
I think the 'one app id for every domain' condition is more to target people who are trying to use multiple app ids for one domain. I think so long as you aren't transferring any data about the user to different domains/adverts etc, you should be ok. Essentially what you are doing is adding FB connect to your wikidot site, then a separate feature of wikidot is to keep you logged in on other partner sites?