Error with https if loadbalancer url is invoked from the browser

0

Hello: I had my domain name in DNS configured with a CNAME record pointing to the load balancer, configured to accept both https and http requests and forwarding them to the instance behind (only accepting http). Everything was working fine. For other reasons, I had to configure the domain name in the DNS with a A record pointing to my new wordpress hosting server, where I will host my future website. So in this new hosting server, I can't use a A record to point to the load balancer. All I can do is to redirect the traffic from the hosting server to the old setup, so I redirect all traffic to the loadbalancer address: xxxx-loadbalancer-xxxxxxxxx.us-west-2.elb.amazonaws.com However, it now only works with http and if I try https, I get the typical Privacy Error because the browser detects that the domain SSL certificate does not match the domain requested (load balancer url). In fact, if I call above url from the browser, I get the privacy error.... My goal is to have this setup in the future: https://mydomain.com (wordpress site from hosting server) https://mudomain.com/myapp (running in AWS instance behind a load balancer). How can I solve this https error? Is there a way to configure this?

Thanks

asked a year ago221 views
1 Answer
0

Hey there, it looks like you are wanting https://mydomain.com to point to your new WordPress site and want https://mydomain.com/myapp to point to your new load balancer.

To do this, you can point mydomain.com to an API Gateway. You’ll be able to set up the API Gateway to direct traffic from mydomain.com/myapp to the load balancer and have the rest of the traffic sent to your WordPress site’s IP address. This can be a bit costly depending on the amount of traffic you are expecting to receive, so alternatively if you do not want to set up an API gateway, you can use Route53 to configure mydomain.com to point to your WordPress site’s IP address and change mydomain.com/myapp to the subdomain myapp.mydomain.com instead, where it will then be pointed towards your new load balancer. Additionally, please make sure to update your website’s certificate to include this new subdomain as well.

For more information, please refer to these links below:

API Gateway

https://repost.aws/knowledge-center/api-gateway-application-load-balancers https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-method-settings-console.html

Route53

https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-routing-traffic-for-subdomains.html

Kaely_C
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions