问题
I Created an EC2 instance that is running perfectly over http.but when i try to replace http
to https
i got this printed on the browser This site can’t provide a secure connection
. the security group that is associated to this instance is configured to allow requests from both HTTP
and HTTPS
as in the attached image:
回答1:
You are trying to run https over a port that has been configured for HTTP.
There are multiple options to get around this:
- Setup a proxy on your local server, such as Nginx. Setup certbot to generate your SSL and then serve this from your proxy.
- Create an ELB in front of your server, generate a certificate in ACM and add your server as a target (running http) to the ELB. Use the load balancer for SSL termination.
- Create a CloudFront distribution in front of your server, generate a certificate in ACM and forward traffic to your server as the origin (running http).
来源:https://stackoverflow.com/questions/62430754/ec2-instance-server-not-accepting-https-requests