To create a new subdomain for your elastic beanstalk and ensure that it is routed correctly by your web server (serving the content in the correct folder), you can follow the following steps:
Create a new virtual host/server block on your web server. Now we need to tell our web server what to do if it receives a request for http://sub.example.org since it was only serving Example Domain previously. We do this by creating a new Virtualhost (Apache) or Server Block (Nginx) that will tell the web server what to do with a request depending on what name is being requested.
Use AWS by Cloudways and create a subdomain in clicks. Go to their platform. Go to the "Domain Management" section. Type the full domain in "Primary Domain." I.E., "staging.domain.com" Click "Save Changes." Then you had to go to your registrar and add a CName for the subdomain so that web browsers can find it.
In this way, it's easier to set up a subdomain on AWS (elastic beanstalk) server.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us