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
feita há 5 anos295 visualizações
1 Resposta
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
respondido há 5 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas