- Newest
- Most votes
- Most comments
To do that, you'll probably need a server of some kind that has a static IP and that has example.com associated with it. This server would be in front of Beanstalk and Lightsail and could route the traffic appropriately. You could manage such a server yourself or use a managed load balancer with some custom rules to do the job. Here's some info about ALB that might be helpful: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-update-rules.html.
Another option to consider is to host your blog at blog.example.com. That way, you could use a simple A record to point to the static IP of your Lightsail Instance for your blog. You could use another ALIAS or CNAME record to point to your Beanstalk app. Here's some more info: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-beanstalk-environment.html.
I would use CloudFront for this. It gives you the ability to map URL paths to specific destinations (origins in CloudFront). You also get caching; global reach; the ability to use Lambda@Edge to manipulate requests and responses in (near) real-time; and lower data transfer rates from origins in AWS.
Thanks for your answers ! I managed to do that with another method that I'll describe below just so you know.
- Create a Wordpress instance on lightsail.
- Set up Amazon VPC peering to work with AWS resources outside of Amazon Lightsail : https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-set-up-vpc-peering-with-aws-resources
- Create a AWS Beanstalk and follow this tutorial on the EC2 instance associated with my Beanstalk https://blog.commutatus.com/how-to-configure-a-reverse-proxy-in-aws-b164de91176e
- Just use the private IP associated with your Wordpress lightsail instead of an EC2 instance in Step 6
- It works !
Don't hesitate to tell me if my method is not good, but it works so far.
Relevant content
- asked 6 months ago
- Accepted Answerasked 8 months ago
- asked a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago