I have a website -- portaldevservices.com
The domain is managed by route 53 and works fine with http.
I have one ec2 instance.
I recently decided to move to https and put a load balancer in front of the ec2 instance.
From here I created a load balancer edited the A record and the Cname to the credentials of the load balancer. The health check is fine and the ec2 instance was added.
Using Amazon Certificate manager I created a cert and added it to the load balancer.
Here are some credentials/info:
When I try to access https://portaldevservices.com I get this:
Website screenshot
hosted zones
load balancer port config
load balancer basic config
load balancer listener
acm certificate
Thanks for the help. I'm a mobile dev so this is my first time really stepping into the backend world.
Solved:
Ok that was a lot easier than I thought. If anyone else experiences this issue all I had to do was add the "www." to the front of my A type
From portaldevservices.com -> www.portaldevservices.com
The https access now works well.
Ok that was a lot easier than I thought. If anyone else experiences this issue all I had to do was add the "www." to the front of my A type
From portaldevservices.com -> www.portaldevservices.com
The https access now works well.
Related
I have a network load balancer setup on EC2 and everything works fine, though I'd like to enable http2 to get better performance and scores from auditing tools (eg. lighthouse).
My setup is Nginx on Ubuntu, the load balancer only has 2 instances to point to.
When I setup the listener to use http2, it doesn't work even though nginx and everything on the instances is setup properly. Is it because I'm using certificate manager and that there's no way for the balancer to use the certificate if it's installed through there?
Thanks a lot!
If someone comes across this, I ended up being able to solve the issue recently.
My problem was that I needed to install a self-issued certificate on both of my EC2 instances. That enables the back-and-forth between the load balancer to be secured and, in turn, it allows the load balancer to reply with the http2 headers signaling that it's available. For some reason, I thought that this was already configured, but it wasn't.
Now everything works fine!
I have the following setup:
React.js App on Cloudfront (example.eu) -> Certificate for *.example.eu and example.eu
Fargate Python FastAPI instance on port 5000
Load Balancer internet facing http://***.eu-central-1.elb.amazonaws.com/
I can visit my website https://example.eu just fine
So in my front-end I defined the Load Balancer URL for doing the requests to the Fargate instance --> GET http://***.eu-central-1.elb.amazonaws.com/users.
I clicked on the button on the website to fire the request to the backend but I get a mixed content error in the browser.
Well, I thought let's do the calls over https - I added a HTTPS on 443 listener and added the certificate created earlier. And if I deactivate the SSL verification (e.g. in Postman) that works fine but else I get in my browser the following error:
VM11:1 GET https://***.eu-central-1.elb.amazonaws.com/users net::ERR_CERT_COMMON_NAME_INVALID
Do I need another certificate for the load balancer URL? I checked out a lot of tutorials and they only create one for the domain.
Do I need to add the certificate to my back-end?
I'm really confused how I can establish a proper https communication from example.eu over the load balancer https://***.eu-central-1.elb.amazonaws.com to my Fargate backend on port 5000.
Thanks
Found the solution:
Go to your Route 53 and add an A entry with Alias Target to the ALB.
Important: Add a subdomain in the name field: e.g. api.example.eu.
That's it :)
I have a Laravel 7 APP with two instances behind an NGINX load balancer with SSL terminating at the load balancer, I've set up Trusted Proxies as described in the Laravel documentation which is working as expected and all traffic is using HTTPS. I have both Laravel instances using the same Redis server for session and a separate Redis server for cache, and both instances are using the same session domain in .env
Both Laravel servers work correctly if they are the only instance in the load balancer. However when both Laravel instances are added to the load balancer any Socialite login fails with an invalid state error.
HTTP 500 Internal Server Error
Laravel\Socialite\Two\InvalidStateException
AbstractProvider->user()
/app/Http/Controllers/Auth/LoginController.php (line 108)
// Get google user data
$google = Socialite::driver('google')->user();
I have the same issue with both Google and Facebook logins. If I try to login manually or register a new user I get 419 | Page Expired, but none of these issues occurs when the load balancer has only one instance or I don't us a load balancer.
Thanks,
Lee.
Ok so I've fixed the problem, I rebuilt the .env file and then cut and pasted into both servers, I then generated new keys and restarted the app servers and the load balancer.
I'd gone through and checked both .env files several times, so either I missed something or the issue wasn't visible ?
Either way it's working now.
Thanks,
Lee.
My wildcard subdomains are not working when I am using a load balancer. I have edited the nginx config so the domain is .xxx.com on both the load balancer and both of my app servers. The servers are setup using Forge.
When I visit a subdomain, the app interprets it as the main domain. For example, visiting subdomain.xxx.com shows me the homepage of xxx.com, and visting subdomain.xxx.com/blog shows me xxx.com/blog (which is a 404). The URL also changes in the browser and doesn't include the subdomain.
The same code works on my staging server, which leads me to believe that the load balancer is causing the issue. I don't have a LB on the staging server.
I have restarted nginx, cleared the route and config cache.
Looking at the request in Telescope, I see that host is set to the domain (not subdomain).
Why is the subdomain not working when using a load balancer?
Turns out the DNS hadn't propagated yet. Weird result.
hundreds of hits for these keywords, but nothing that is totally relevant.
So my web server is behind a load balancer. The web site is exposed by SSL.
When I open my logon page https[mydomain]/app/somepage.aspx, I am redirected to http://[ip address of server]/app/somepage.aspx.
I tried the follwing
Setting the loginurl to https[mydomain]/app/somepage.aspx, doesnt work
tried fiddling with the binding in iis, but there's an issue that forces us to use appcmd to set the hostname, but nothing works after I set it.
Suggestions?
Thanks
This sounds more like a load balancer configuration error, or maybe your load balance just isn't capable of forwarding the request using the same url. It seems like your load balancer is mroe of a proxy, and is creating a new request using only the IP address. Most decent load balancers should have an option for forwarding the hostname.
This might be more of a Serverfault question because it has more to do with load balancer configuration.