Why Google physicalweb.googleapis.com doesn't resolve https address working on Amazon AWS - https

We have an Elastic Load Balancer, and behind that we have an EC2 server instance. We have a certificate that was issued by Amazon Certificate manager, which protects our *.domain.com, and is assigned to the load balancer. We have our DNS configured so that requests to *.domain.com are sent to the load balancer. So www.domain.com over https goes to load balancer, which then goes to EC2 server which should get the website. This works in the web browser - we can see a website - but not in the physical web browser chrome://physical-web in Chrome on Android (get UNRESOLVED status only for this address, direct links to let's say www.paypal.com are resolved correctly) and url validator tool responds "URL not found": https://beaufortfrancois.github.io/sandbox/physical-web/url-validator/

robots.txt must exist at the server to pass validation over google api and be resolved in Chrome browser.

Related

AWS secure Cloudfront to ALB to Fargate communication

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 :)

ec2 hosted lamp site not visible from browser

I have setup an Amazon EC2 Ubuntu 16 server for the first time.
With the issued public IPv4 IP address I have ssh'ed into the server and installed a lamp stack.
However when I paste the IP address into my browser I get the following error:
Error
The requested URL could not be retrieved
Error: Access to the web site failed
Why you are seeing this:
The web filter could not display the requested site.
Possible reasons could be:
The web site denied you access, or the web filter received no reply from the site.
Internet connectivity issues might be preventing the website from sending or receiving traffic.
If this problem persists, please ask your administrator to:
Check access to the specific site - the HTTP error code is 504: Gateway Timeout.
From what I've seen online, I should see the default apache webpage from my server at this point.
Can anyone shed some light on this issue?

classic load balancer https acm issue

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.

How to redirect http to https EC2 windows instance of AWS?

I have implemented SSL on my EC2 Windows instance. As AWS doesn't directly allow to configure SSL on EC2 instance, so I created a Load Balancer with HTTPS and configure my SSL certificate with it. I have selected my EC2 instance for Load Balancer.
Following are the listeners of my Load Balancer:
After this configuration, my domain starts working on http and also on https like http://example.com and https://example.com
Now, I want to redirect http request to https. My domain is on Godaddy. I have successfully change DNS and they are working. But when I place URL rewrite code in web.config file then both of my URLs stop working. It gives HTTP error 503
This link outlines some great options - https://blogs.msdn.microsoft.com/kaushal/2013/05/22/http-to-https-redirects-on-iis-7-x-and-higher/

How do I get Google Cloud load balancer to set a cookie via a socket.io server it's proxying?

I'm running a Google Cloud HTTPS load balancer in front of 2 Compute Engine VM instances that are each running a socket.io server on port 80. They work fine and are reachable from my HTML/JS socket.io client that I'm running locally.
I have set my Google Cloud load balancer to use Session Affinity with "Generated Cookie". According to the docs, this should set a cookie named GCLB on the client. The cookie never gets set in my client, why?
I think my issue might be that I'm not really serving the client through the load balancer (or on google at all), but serving it locally, once this is a real client it will sit on a CDN somewhere. I am using a hostname locally that is on the same domain name as the load balancer. Meaning, my socket.io html client is at http://local.mydomain.com:8000/ and it connects to my socket.io server/load balancer which lives at https://io.mydomain.com/ note: ssl on server only
Any ideas as to how I can get the cookie set, or do I need to handle this differently?

Resources