I've deployed a Django project on Google Cloud standard AppEngine,
https://mooveup-9645.oa.r.appspot.com
https://my-domain.fr
the web site cannot be accessed. My Question is: Where should I add my domain name?if APPENGINE_URL:
# Ensure a scheme is present in the URL before it's processed.
if not urlparse(APPENGINE_URL).scheme:
APPENGINE_URL = f"https://{APPENGINE_URL}"
ALLOWED_HOSTS = [urlparse(APPENGINE_URL).netloc, "www.my-domain.fr", "my-domain.fr"]
Is this the appropriate solution in Django settings or is there another configuration step with GCP?
You must add the Custom Domain in the GCP console:
https://console.cloud.google.com/appengine/settings/domains?project={your_project}
On Google Cloud tutorial to deploy an Django project on AppEngine, some steps are skipped.
ALLOWED_HOSTS
with your domain name.502
:$ gcloud app deploy --project PROJECT_ID --promote
$ gcloud app versions list --project PROJECT_ID //to get the older versions
$ gcloud app versions delete VERSION_ID
Then:
On https://console.cloud.google.com/appengine/settings
, you should customize your domain name and end your domain name with a DOT in order to get the DNS records and then update them on https://domains.google.com/registrar/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.