I am completely new to Networking and setting up Domains. But recently I bought a domain (xyz-demos.com) and I want to use it as a domain to my Openshift App Routes. I did not find any proper guide on how to do it.
In Openshift I have 3 apps running with routes as,
appname-namespace.serverIP.nip.io
app1-namespace1.35.55.55.555.nip.io
app2-namespace2.35.55.55.555.nip.io
app3-namespace3.35.55.55.555.nip.io
any other app deployed in the future will just append its name,
appName-namespace.serverIP.nip.io
How do I map my custom domain so that all my Openshift apps use it? Something like, how to replace
35.55.55.555.nip.io with xyz-demos.com
appname-namespace.xyz-demos.com
app1-namespace1.xyz-demos.com
app2-namespace2.xyz-demos.com
app3-namespace3.xyz-demos.com
I am using a domain from GoDaddy and Openshift Origin 3.9.
Note - The reason why I am going with custom domains, is that
*.nip.io domains are restricted in my office network as Dynamic DNS and I do not know a way around it.
This is a kind of configuration what you need to do in the cluster creation time, I mean, in the inventory file of your cluster creation you need to configure the following fields:
openshift_master_cluster_hostname=ocp.xyz-demos.com
openshift_master_cluster_public_hostname=ocp.xyz-demos.com
openshift_master_default_subdomain=xyz-demos.com
Dont forget to configure the certs of your domain:
openshift_master_overwrite_named_certificates=True
openshift_master_named_certificates=[{"certfile": "/etc/ansible/certs/xyz-demos.com.crt", "keyfile": "/etc/ansible/certs/xyz-demos.com.key", "cafile": "/etc/ansible/certs/ca-xyz-demos.com.crt"}]
And force the Routers to add this new subdomain in the new Routes:
openshift_hosted_router_force_subdomain=xyz-demos.com
Thoses fields are responsible to expose your admin console and application routes.
Related
We are developing a suite of separate SPA applications where each one lives on a separate subdomain with a common parent domain.
app1.domain.com
app2.domain.com
We want to avoid customers having to sign in to each app separately. So we want to be able to sign in once to one app and remaining signed in when visiting the other apps. Similarly, signing out of one would sign out in the others.
Based on my research of the Auth0 docs, this seemed to be possible with a custom domain. So changed our plan, added the custom domain auth.domain.com and created a test SPA app that could log in. I then created two subdomains and pointed them both at the app.
Logging in to app1.domain.com worked. The auth0.{clientid}.is.authenticated cookie was created. However, the cookie’s domain was app1.domain.com, not .domain.com as I’d hoped.
I then tried visiting the app2.domain.com and confirmed that the cookie definitely wasn’t there and I wasn’t logged in.
Is there any way to configure Auth0 to keep a user logged in across all the subdomains?
(I posted this on the Auth0 Forums here but got no replies)
I opened a pull request on auth0-spa-js package to add an option to specify the cookie domain. It was accepted and merged in version 1.21.0 and later.
In your client configuration, add a cookieDomain option.
const auth0 = await createAuth0Client({
domain: '<AUTH0_DOMAIN>',
client_id: '<AUTH0_CLIENT_ID>',
redirect_uri: '<MY_CALLBACK_URL>',
audience: '<MY_AUDIENCE>',
cookieDomain: '.example.com',
})
NOTE: Top level cookie domains always start with a period ..
Use this configuration on each app/subdomain under the same top level domain and you'll notice the auth0.{clientid}.is.authenticated cookie will exist on both. Signing in on one will result in you being signed in when you visit any others.
The auth0-spa-js package is used by most of the other auth0 plugins for Vue, React, etc. so client configuration should be virtually identical.
I am working on adding Google reCAPTCHA v3 to FreeToastHost, a free forms & template based website generator/content management system specifically made for use by Toastmasters public speaking clubs around the world.
One challenge I have in implementing this is that in addition to our use of a root domain and subdomains for accessing each club's website, we also support each club purchasing their own "custom website domain" through a registrar which they they tie to our server's IP address via their DNS settings.
We do require that each club save these "custom domain names" in the system (gets stored in our db) so we can still generate their website by looking up their custom domain in our db to fetch their content. At this point we have about 80 clubs of the 12000+ using the system that also have custom domains.
I will not know these custom domains in advance, so I have had to just register our root domain for Google reCAPTCHA v3, shut off the domain checking setting because of the custom domains, and resolve to do our own domain checking.
I would prefer that Google do the domain checking, but without an API to add domains programmatically / dynamically and with their 50 domain limit per key-pair, I am just not sure what else to do other than doing our own domain checking.
Anyone have any fresh ideas on this?
Presently I have two app services on Azure
An Angular 7 application - mydomainUI.azurewebsites.net
A NET Core web API - mydomainAPI.azurewebsites.net
I also have two DNS records on godaddy:
An A record to the Azure IP address and a
text record # to mydomainUI.azurewebsites.net
Angular makes the API calls to the azure domain. Everything works fine but the home page load takes too long with all the Angular overhead. I would like to add a third app service: a fast loading MVC application that handles the home page ONLY. It would be something like mydomainPUBLIC.azurewebsites.net. All other requests should be handled by the Angular routing of the UI app service. The browser should only show mydomain.com for everything and not the azure domains.
Can this be done without sub-domains? What DNS record(s) would I have to add on godaddy? Any other considerations?
Thank you in advance
I don't think you can route to different web app service with the same domain unless you use subdomains. However, if you consider using path-based URL to access your different web apps, here are two options for you.
You can place multiple web apps in the same web app service with different Azure virtual directories. See here1 and here2. Then set the custom domains in your current web app service.
You could use Azure application gateway route to multiple web app services based on Path URL. URL Path-Based Routing allows you to route traffic to back-end server pools based on URL Paths of the request.
You could follow this to configure App Service with Application Gateway. You need to
Create three backend pools and place each app service in the separate backend pool.
Create three HTTP Settings and Custom Probe with “Pick Hostname” switches enabled(Check Use App Service check box)
Create a basic backend listener and a path-based routing rule. Refer to this tutorial.
If you face any question, please let me know.
Anyone know of a guide on how to but APP GW infront of APIM, should be possible but cant figure out how (or not sure how to setup APP GW).
thx
I have exactly this same issue and seems there is not a way of having an exposed APIM to put in front of it one APP GW. What is pretty annoying.
The only way I find is to put APIM in a internal VNET https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-integrate-internal-vnet-appgateway
Yes, you can actually forward traffic from Application Gateway to API Management with VNET configuration set to 'None'
Normally add your listener
Add your backend pool with the default FQDN (xxx.azure-api.net) of the API Management
Add a heath probe pointing to xxx.azure-api.net/status-0123456789abcdef
Add a HTTPS backend setting with Backend authentication certificate with Use for App service set 'yes' and a custom probe the aforementioned.
Add a rule combining all the above and a path based rule with just a '/'
This is all you need.
In order to expose management and developer portal through application gateway you need all the above but the health probes should point to xxx.portal.azure-api.net/signin and xxx.management.azure-api.net/ServiceStatus accordingly
I'm running Magento on a shared server with a single IP. I originally set it up as a single store with no plans to do multi-stores. Do I need to have store codes trailing each domain in magento to get this work correctly? They will all checkout at the main store URL. I have done this in the past and it has worked fine for me, but I was using store codes and with this instance I am not.
Will it completely jack up my SEO?
So I have store1.com (main store) and store2.com which needs to checkout at store1.com
Any help or link to a how to would be great. Have not been able to find a straight forward answer.
Your proposed setup of having store1.com and store2.com with a shared checkout URL of store1.com will work with a bit of work from yourself, but it's not clean or ideal in my opinion. Magento will append an SSID every time it switches domain to try and re-load the customers session data (They will have ?SSID=something). You would also need to change the checkout URL in your templates to only use the 1 domain which would require hard coding the full URL to the checkout and cart page in the store2.com templates.
Personally I would simply have separate checkouts for each domain which is supported straight out of the box in Magento without really doing anything. Why the need to have the checkout always under 1 domain? If it's because of SSL and 1 IP limitations then buy a UCC SSL certificate for multiple domains and have all the domains required to run on the server setup as SANS on the certificate. Cheap and simple. This way there is no need for store codes in URLs, SSIDs in domain switching, and the user will always stay on the same domain without any funny switching business or complications.
As a customer I would also be a little surprised to shop on one domain and then checkout on another these days, especially if one of the domains is international and this will ultimately effect your conversion rate.
You seem to be familiar with store views, so once you have setup your secondary store view, simply go into the admin and override the base URLs for the secondary domain. Point the store2.com domain to the same IP address you are using for store1.com. Setup a vhost on the server so store2.com effectively replicates the vhost for store1.com. You can use vhost directives so that magento initiates the correct store view for the relevant domain name in your new vhost.
SetEnv MAGE_RUN_CODE yourstorecode
SetEnv MAGE_RUN_TYPE store
You should now be able to have multiple sites/domains running on 1 magento instance each with an individual checkout URL. e.g. store1.com/checkout/onepage/ and store2.com/checkout/onepage/.
By using a UCC SSL certificate, the SSL will be valid for both domains and not cause you issues so no need for multiple IPs.