How to correctly map godaddy domain to gcloud app engine project? - google-app-engine

I've deployed a nuxtjs app to gcloud app engine as described in nuxtjs docs using gcloud cli - gcloud app deploy [app-project-id] after that I browse the app with gcloud app browse -s nuxt and it works fine, but after I added my custom domain dns records to godaddy, the domain shows nothing and I got the screenshot below when I visit the live domain.
However it was working very well when it was deployed on heroku, It's been an hour since I added app engine dns record to godaddy, and the result still the same, does it takes this much time?, and how can I fix this ?

According to the App Engine Custom domains docs, in some cases, it takes several hours for the DNS configuration changes to take effect.
In most cases, it takes only a few minutes for these changes to take effect, but in some cases it can take up to several hours,
Then I checked this DNS lookup tool and I saw that your domain name vetution.com has an A record of 15.197.142.173 and 3.33.152.147 which is not related to App Engine ip address. I suggest removing the said IP addresses in your domain provider (Go daddy)
Also, Another A record is pointed to www.vetution.com.
If the issue still persists. You should contact the Google Cloud App Engine Support team since we don't have visibility on your project.

Related

Custom domains / catch all hostnames on Google App Engine

I'm trying to configure my Google App Engine instance with Cloudflare for Saas, and more precisely Cloudflare's SSL for SaaS offering. The objective being that I can provide to my customer a "custom domain" (also known as "vanity domain"), such that they don't go to dashboard.mywebsite.com, but instead app.customerwebsite.com.
Configuration part
To make sure that my App Engine instance is correctly serving content on dashboard.mywebsite.com, I've made the following:
On Google Cloud side:
I've configured the custom domain dashboard.mywebsite.com.
I've let Google manage the SSL configuration (no custom key/certificate)
Here is my app.yaml configuration file:
runtime: nodejs14
env_variables:
NODE_ENV: 'production'
basic_scaling:
max_instances: 10
idle_timeout: 5m
On Cloudflare side:
I've updated the DNS records so that dashboard.mywebsite.com is perfectly working
I've configured the SSL on the Full mode (while I've tried with Flexible as well - both work)
I waited for a few hours and I confirm that dashboard.mywebsite.com resolves correctly and serves my content (from Google App Engine).
Next, custom domains
According to Cloudflare documentation, I had to register the fallback origin (i.e. dashboard.website.com) and then configure a custom hostname (e.g. app.customerwebsite.com). Which I did.
Now, according to Cloudflare documentation again, my customer has to create a CNAME record. Which I did with a domain of mine:
app.customerwebsite.com CNAME dashboard.mycompany.com
The issue
I waited a few hours again. Then, when I open app.customerwebsite.com in my browser, it shows a Google 404 error page instead of my dashboard. Which makes me think that Cloudflare successfully "redirects" the traffic to Google, but App Engine refuses to serve it. Probably because it doesn't know app.customerwebsite.com?
Any thoughts that would help?
As you noticed, the issue is not related to Cloudflare, but App Engine. The problem with your configuration is that, when App Engine receives a request, based on the Host header, it forwards the request to the right instance.
App Engine lets you map any custom domains that has been previously validated by Google. But in your situation, that would mean you have to register each custom domain of your customers on your App Engine instance. That's too cumbersome (if even possible).
What you need to do instead is the following:
enable a static IP address with Google Cloud
change your DNS record from dashboard CNAME ghs.googlehosted.com to dashboard A YOUR_IP_ADDRESS
configure a Google Cloud Load Balancer to map requests received on that IP address to your App Engine instance.
Google's documentation has a great guide on how to setup a load balancer with Cloud Run. By changing a few settings it works great with App Engine. As an extra help, below is the configuration details of our load balancer that allows us to provide vanity domains / custom domains to our customers through Google Cloud:
Again, the load balancer is here responsible to map all requests received by your IP address (no matter the Host header) straight to your App Engine instance.
As a best practice, it might be useful to push a dispatch.yaml file to your instance:
dispatch:
- url: '*/*'
service: default
Which tells App Engine to send all requests to the default service. It works a bit like a wildcard virtual hosts on an Apache server.

Azure app service easy auth with Azure AD is not working for linux web app

Azure web app Easy auth (with Azure AD auth) is working for windows web apps, but not on Linux web app.
After enabling the easy auth with Azure AD the web app url shows page not found.
When I checked the web app logs, the container has started and ready to serve the requests. But the web app still shows same Not Found error.
If I disable the easy-auth the web app is working as is.
My azure web app tech stack is
React SPA running on Node LTS 14 in a Linux web app.
Not sure if I am missing something on configuration. Any help is appreciated.
Thanks in advance...
Please check if below cases :
Note :
Limitation : App Service on Linux is not supported on Shared pricing tier.
Linux Azure Web Apps uses pm2 to serve a node app
Go to Azure app service> Configuration > General Settings.
If your build folder is at the root of the project,give Start up command: pm2 serve /home/site/wwwroot --no-daemon –spa
Please go through these related issue References to trouble shoot :
reactjs - Web App Linux - Stack Overflow
React App not starting in azure app service - Stack Overflow
Also please check this Blog.
According to Azure App Service | Microsoft Docs
This error could be due to one of several reasons:
The custom domain configured is missing an A record or a CNAME
record.
The web app owner has moved the web app to a different region, but
the DNS cache is still directing to the old IP Address that was used
in the previous region.
Clear the browser cache and cookies for the site and test for DNS
resolution/ dns entries if they are still pointing to an old IP.Edit
and correct dns in that case.
In your app page, select TLS/SSL settings. Then make HTTPS Only to On.
Also, suggest you Enable diagnostics logging for web apps in Azure App Service incase if you haven’t enabled earlier to check the complete error details and root cause.

Is there a way of checking if a Web Application or Website using the Google App Engine?

I am trying to figure out whether to use Google App Engine or other available PaaS. During my research, I am trying to figure out if a particular website using google app engine or not - Is there any known method to figure this out ?
Sorry for the basic question, but appreciate any help. Thanks.
You can recognize a GAE-based site based on the server's domain:
*.appspot.com - default domain of standard GAE apps
*.appspot-preview.com - default domain of newer flex GAE apps
custom domains mapped to ghs.google.com or ghs.googlehosted.com. See step 5 in the Adding a custom domain for your application procedure and how does ghs.google.com work?. Note that I'm unsure if this doesn't also apply to other Google products, not only to GAE.
There may be other such domains as well.
You can also check the Server header in the responses coming from the site. From Headers added or replaced:
Server
Set to Google Frontend. The development server sets this to
Development/x, where x is the version number.
ping the domain and if you have something with ghs.googlehosted.com:
PING ghs.googlehosted.com (216.58.213.147): 56 data bytes
It's a GAE application. You can also check the headers in requests from your browser's dev tools.

Error message "service cloudbuilt.googleapis.com is not for consumer..." when deploying App Engine application

My team and I are working on the Trendy Lights Tutorial.
We have set up all the files and also have converted the .p12 key to .pem key but failed to run the app on the Google Cloud Platform and constantly got the error message saying:
You do not have permission to access project [...] and service
"cloudbuilt.googleapis.com" is not for consumer..."
We have already whitelisted our service account for the use of Earth Engine. Does anyone know what the problem might be?
Thank you so much!
I see that you are attempting to deploy your application to the App Engine Flexible Environment.
The Flexible environment differs from the Standard environment in that it gives you more control over the individual instances that are running your deployed application. It does this by hosting your application within Docker on Compute Engine virtual machines.
Therefore, you will need to enable the Compute Engine API for your project so that the GCloud tool can start new Compute Engine virtual machines when you deploy your application.
Note: Since the Flexible environment uses Compute Engine resources, you will also need to enable billing for your project.
If after performing the above you still experience the 'cloudbuild.googleapis.com' error, I ask that you run gcloud components update, then ensure that the value of account seen in the output of the command gcloud info has Owner or Editor permissions in your project.
If it still persists after all of the above, you should then open a Public Issue Tracker to inform our backend team of the issue.

How do I serve an app engine version via subdomain when my app runs through Google Apps?

I'm trying to use a subdomain to serve a matching version id with Google App Engine and Google Apps. I've gone through the documentation but it's still unclear to me.
On this page regarding custom domains, it says I'm in a special case for using Google Apps. test.example.com -> to load "test" version of the application.
https://cloud.google.com/appengine/docs/domain -
Note that the instructions on this page are for App Engine apps that use an ordinary HTTP connection and are not served through Google Apps. Here are some related procedures that require different instructions:
This leads me to here https://support.google.com/a/answer/91080
It looks like the only way to add this subdomain in Google Apps is the Sites URL field.
Will the Sites URL correspond to the App Engine version ID?
You only need to use Google Apps to map an appengine app to a domain if you need https. Right now, Google Apps is the only way you can upload an SSL cert - hence this restriction.
If you do map your appengine app to a domain through google apps, you can do what you want by using wildcard subdomain mapping. Read more here..
The whole process is tedious, slow, and painful, and thats only when its not confusing, so put aside a good few hours to make all the changes and wait for DNS to propagate.

Resources