I'm trying to connect a subdomain to an AWS Elasticbeanstalk instance running a Django application using a certificate from AWS Certificate Manager. The domain is registered at 123-Reg.
AWS Certificate Manager is showing a validation status of success for the certificate.
I have added it to the Load balancers within the Elasticbeanstalk instance (Port 443, Protocal HTTPS, Instance Post 443, InstanceProtocol HTTPS, SSL Certificate as per Certificate Manager).
I have added the subdomain and the .acm-validations.aws
to ALLOWED_HOSTS in the django app (I don't know if this is required).
Like this, the site gets directed to the VPS of the primary domain (rather than the subdomain). This simply causes an HTTPS error because there is no certificate for the subdomain on this VPS.
I've tried adding a CNAME DNS record for the subdomain to point at the url of the elasticbeanstalk instance, but this simply produces a blank screen.
How do I get a subdomain working with an elasticbeanstalk instance?