External domain routing and SSL
I'm building a platform with some kind of "company profiles", and currently the customers can get their profile on platform.com/company-name. I'd like to achieve the possibility for the customers to get it shown on profile.company-domain.com. I'm using Laravel, Forge and Envoyer and open to additional requirements.
I know it requires a CNAME record, and that's not an issue - I got that part right. But I have 2 issues:
-
When accessing profile.company-domain.com, it gives an SSL error, because the certificate is for platform.com and not company-domain.com. How can I fix this? I tried to generate further SSL certificates in Forge (LetsEncrypt), but I can only activate one at a time.
-
How do I route the request correctly in Laravel? I have been looking at this and think, it can do it: https://medium.com/@joelennon/dynamic-custom-domain-routing-in-laravel-62c5ffec666b
Please or to participate in this conversation.