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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ