How to route to two different AWS applications on the same domain with different URLs using Applicaiton Load...
up vote
1
down vote
favorite
I have a web app (Node.js on Elastic Beanstalk) already serving at example.com
. I have a WordPress blog that I want to serve at example.com/blog
.
I want to setup AWS Load Balancer to route requests at /blog
to my WordPress server and all other requests at /
to my web-app. How do I do it using AWS Load Balancer(s)?
My DNS and both of these servers are on AWS. I don't want to setup a self-managed Nginx/HAProxy reverse proxy. If possible, I want to avoid using CloudFront configuration at the moment.
aws-load-balancer
add a comment |
up vote
1
down vote
favorite
I have a web app (Node.js on Elastic Beanstalk) already serving at example.com
. I have a WordPress blog that I want to serve at example.com/blog
.
I want to setup AWS Load Balancer to route requests at /blog
to my WordPress server and all other requests at /
to my web-app. How do I do it using AWS Load Balancer(s)?
My DNS and both of these servers are on AWS. I don't want to setup a self-managed Nginx/HAProxy reverse proxy. If possible, I want to avoid using CloudFront configuration at the moment.
aws-load-balancer
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a web app (Node.js on Elastic Beanstalk) already serving at example.com
. I have a WordPress blog that I want to serve at example.com/blog
.
I want to setup AWS Load Balancer to route requests at /blog
to my WordPress server and all other requests at /
to my web-app. How do I do it using AWS Load Balancer(s)?
My DNS and both of these servers are on AWS. I don't want to setup a self-managed Nginx/HAProxy reverse proxy. If possible, I want to avoid using CloudFront configuration at the moment.
aws-load-balancer
I have a web app (Node.js on Elastic Beanstalk) already serving at example.com
. I have a WordPress blog that I want to serve at example.com/blog
.
I want to setup AWS Load Balancer to route requests at /blog
to my WordPress server and all other requests at /
to my web-app. How do I do it using AWS Load Balancer(s)?
My DNS and both of these servers are on AWS. I don't want to setup a self-managed Nginx/HAProxy reverse proxy. If possible, I want to avoid using CloudFront configuration at the moment.
aws-load-balancer
aws-load-balancer
asked Nov 19 at 12:23
Emad Ehsan
5003925
5003925
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
This is possible by adding a listener rule to an Application Load Balancer. Listener rules determine how the load balancer routes requests to the targets in one or more target groups.
After creating the load balancer, see Listeners >> Add Listener. Add a Rule with a Condition for Path is /blog
then select Action forward to send traffic to a separate target group mapped to the Wordpress instances.
For more see the docs for Listener Rules for Your Application Load Balancer.
Thanks buddy. I did exactly this. The website is perfectly accessible atexample.com
but I get 504 Gateway timeout onexample.com/blog
. WP server is accessible at it's own Elastic Beanstalk url but not viaexample.com/blog
– Emad Ehsan
Nov 22 at 10:23
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
This is possible by adding a listener rule to an Application Load Balancer. Listener rules determine how the load balancer routes requests to the targets in one or more target groups.
After creating the load balancer, see Listeners >> Add Listener. Add a Rule with a Condition for Path is /blog
then select Action forward to send traffic to a separate target group mapped to the Wordpress instances.
For more see the docs for Listener Rules for Your Application Load Balancer.
Thanks buddy. I did exactly this. The website is perfectly accessible atexample.com
but I get 504 Gateway timeout onexample.com/blog
. WP server is accessible at it's own Elastic Beanstalk url but not viaexample.com/blog
– Emad Ehsan
Nov 22 at 10:23
add a comment |
up vote
1
down vote
This is possible by adding a listener rule to an Application Load Balancer. Listener rules determine how the load balancer routes requests to the targets in one or more target groups.
After creating the load balancer, see Listeners >> Add Listener. Add a Rule with a Condition for Path is /blog
then select Action forward to send traffic to a separate target group mapped to the Wordpress instances.
For more see the docs for Listener Rules for Your Application Load Balancer.
Thanks buddy. I did exactly this. The website is perfectly accessible atexample.com
but I get 504 Gateway timeout onexample.com/blog
. WP server is accessible at it's own Elastic Beanstalk url but not viaexample.com/blog
– Emad Ehsan
Nov 22 at 10:23
add a comment |
up vote
1
down vote
up vote
1
down vote
This is possible by adding a listener rule to an Application Load Balancer. Listener rules determine how the load balancer routes requests to the targets in one or more target groups.
After creating the load balancer, see Listeners >> Add Listener. Add a Rule with a Condition for Path is /blog
then select Action forward to send traffic to a separate target group mapped to the Wordpress instances.
For more see the docs for Listener Rules for Your Application Load Balancer.
This is possible by adding a listener rule to an Application Load Balancer. Listener rules determine how the load balancer routes requests to the targets in one or more target groups.
After creating the load balancer, see Listeners >> Add Listener. Add a Rule with a Condition for Path is /blog
then select Action forward to send traffic to a separate target group mapped to the Wordpress instances.
For more see the docs for Listener Rules for Your Application Load Balancer.
edited Nov 21 at 13:52
answered Nov 21 at 3:51
brennan
1,750927
1,750927
Thanks buddy. I did exactly this. The website is perfectly accessible atexample.com
but I get 504 Gateway timeout onexample.com/blog
. WP server is accessible at it's own Elastic Beanstalk url but not viaexample.com/blog
– Emad Ehsan
Nov 22 at 10:23
add a comment |
Thanks buddy. I did exactly this. The website is perfectly accessible atexample.com
but I get 504 Gateway timeout onexample.com/blog
. WP server is accessible at it's own Elastic Beanstalk url but not viaexample.com/blog
– Emad Ehsan
Nov 22 at 10:23
Thanks buddy. I did exactly this. The website is perfectly accessible at
example.com
but I get 504 Gateway timeout on example.com/blog
. WP server is accessible at it's own Elastic Beanstalk url but not via example.com/blog
– Emad Ehsan
Nov 22 at 10:23
Thanks buddy. I did exactly this. The website is perfectly accessible at
example.com
but I get 504 Gateway timeout on example.com/blog
. WP server is accessible at it's own Elastic Beanstalk url but not via example.com/blog
– Emad Ehsan
Nov 22 at 10:23
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374569%2fhow-to-route-to-two-different-aws-applications-on-the-same-domain-with-different%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown