amazon ec2 - Allowed Host Setting for Django on EC2 -
i deployed amazon ec2 bitnami djnago stack , i'm having trouble allowed_hosts setting in settings.py file. not sure hostname use or find it. have tried internal ip, external ip, localhost, domain name. thing gets 500 error pages stop, is:
allowed_hosts = ['*']
but, security issue. missing?
set -
allowed_hosts = [ '.yourdomain.com' ]
where yourdomain.com
domain name you're using access it.
the documentation says -
values in list can qualified names (e.g. 'www.example.com'), in case matched against request’s host header (case-insensitive, not including port). value beginning period can used subdomain wildcard: '.example.com' match example.com, www.example.com, , other subdomain of example.com.
when set www.yourdomain.com
, there must have been request subdomain, other www
. caused trouble. cannot because don't have information.
Comments
Post a Comment