Multi tenancy laravel app hosted on elastic beanstalk environment

0

Question is related to the sub domain that I pointed to the EB environment domain from CloudFlare. The issue is how can I identify the tenant based on sub domain?

In my localhost environment I created a Virtual host by editing the host file like this 127.0.0.1 netlink after creating the virtual host I can ping to that api endpoints like this netlink:8000/api

How can I achieve the same with domain like this netlink.mydomain.com ? In here netlink is the sub domain created for the tenant in CloudFlare host ( CNAME record ). netlink.mydomain.com this domain being pointed to the Elastic Beanstalk domain.

Do I need to create VH in every sub domains in AWS ?

Note: I'm using the laravel tenancy package to create tenants. https://tenancyforlaravel.com/docs/v3

Asela
feita há 4 meses140 visualizações
1 Resposta
0

Hello,

As you mentioned that you have created netlink as subnet and that was created for the tenant in CloudFlare host ( CNAME record ). netlink.mydomain.com this domain being pointed to the Elastic Beanstalk domain. So you have to create similarly for all subdomains and point them to beanstalk. Please note that route 53 is a dns service and didn't understand host redirection or http headers.

For example you can have sub-domain configuration like below :

netlink.mydomain.com A (Alias) XXXXXXXXXXXXXXXXXXXXelasticbeanstalk.com.

XYZ.mydomain.comA (Alias) XXXXXXXXXXXXXXXXXXXX.elasticbeanstalk.com.

Hence I will suggest you to please have to look on how to create subdomains here

Thank you!!

AWS
ENGENHEIRO DE SUPORTE
respondido há 4 meses

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