ELB HTTPS setup for Django App

0

Hello. I am using AWS Amplify (HTTPS) to host my React app. It cannot communicate with my EB instance (Django Rest Framework app) since it uses HTTP. I made a subdomain and have got a SSL certificate which I imported into AWS and added to an ELB (Classic) on my instance, which listens on 443 (HTTPS) and has instance port as 80 (HTTP). The EB instance health is now on Severe and the logs say:

 django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: '172.31.3.66'. You may need to add '172.31.3.66' to ALLOWED_HOSTS.
Invalid HTTP_HOST header: '172.31.3.66'. You may need to add '172.31.3.66' to ALLOWED_HOSTS.

I've verified that the subdomain infact connected to the EB instance and it worked fine using HTTP. After I changed the instance listener protocol and port to HTTP and 80, it stopped working altogether. Please let me know if you have any ideas on how this can be setup correctly.

Rohit
질문됨 3달 전136회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠