Problems mapping specific folder as a subdomain with Elastic Beanstalk

0

Hi,

We have Elastic Beanstalk instance (Platform: Python 3.6 running on 64bit Amazon Linux/2.6.6) and we're building Django applications. Our root domain is working just fine, but the problem is how to map subfolder (different Django app) as a subdomain of that root domain (e.g. https://rootdomain.com/folder/ -> https://folder.rootdomain.com/). Which is the best or easiest way to do it? We've already tried with S3 buckets and some VirtualHost definition to .ebextensions config, but nothing seems to work.

N3_team
질문됨 5년 전295회 조회
1개 답변
0

Well, I solved this problem by myself, but wanted to share if some else is looking for solution. So, we have one EB instance with multiple Django applications and our need is to show those applications under different subdomains.

The fastest way is to add "folder.rootdomain.com" A alias to the DNS records (Route 53) which points to the root domain of the EB instance.

Then you just add your own middleware class to the django project with custom "process_request" implementation and replace request.urlconf with the urls of the specific application and done!

N3_team
답변함 5년 전

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

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

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

관련 콘텐츠