On EC2 Windows Instance, SSL not working

0

I've hosted my website developed in Node JS & React JS on EC2 Windows instance (free tier). I've created AWS Certificate (Public) and configured a Load balancer but I am not able to access website using https:// (SSL enabled). Kindly help.

2 Answers
0

It sounds like you're experiencing issues with SSL configuration for your website hosted on an EC2 Windows instance. Here are some steps to troubleshoot and potentially resolve the issue:

  1. Verify SSL/TLS configuration:

    • Check if the required certificates are properly installed and not corrupted.
    • Ensure appropriate TLS protocols are enabled on your EC2 instance.
  2. Review Load Balancer settings:

    • Confirm that you have configured an HTTPS listener (port 443) on your Application Load Balancer (ALB).
    • Verify that the SSL certificate from AWS Certificate Manager (ACM) is correctly associated with the HTTPS listener.
  3. Check security group configurations:

    • Ensure that both the EC2 instance and the ALB security groups allow inbound traffic on port 443 (HTTPS).
    • Verify that the EC2 instance security group allows inbound traffic from the ALB.
  4. DNS configuration:

    • Make sure your domain's DNS settings point to the ALB's DNS name, not directly to the EC2 instance's IP address.
    • Confirm that you have created the necessary CNAME or A records for both www and non-www versions of your domain.
  5. EC2 instance configuration:

    • Ensure your Node.js application is configured to handle HTTPS traffic coming from the load balancer.
    • Check that your application is listening on the correct port (usually 80 for HTTP traffic from the ALB).
  6. Test connectivity:

    • Use tools like openssl or curl to test the SSL connection directly to your ALB.
    • Check Windows Event Viewer and your application logs for any relevant error messages.
  7. Clear browser cache:

    • Sometimes, cached data can interfere with accessing the secure version of your site. Try clearing your browser cache and cookies.

If you've followed these steps and are still experiencing issues, you may need to review your application code to ensure it's properly handling HTTPS requests and not causing any redirection issues. Additionally, double-check that your ACM certificate covers both the www and non-www versions of your domain.

Remember, when using an ALB with ACM, the SSL termination happens at the load balancer level, so your EC2 instance only needs to handle regular HTTP traffic from the ALB.

If the problem persists, you may need to enable detailed logging on your ALB and EC2 instance to identify the root cause of the issue.

Sources
Windows EC2: SSL Connection could not be established | AWS re:Post
HTTPS Not Working for Non-WWW Domain on AWS Load Balancer | AWS re:Post
Trying to configure an external SSL certificate for EC2 load balancer | AWS re:Post

profile picture
answered 12 days ago
profile picture
EXPERT
reviewed 12 days ago
0

SSL Certificate: In the Load Balancer, make sure the HTTPS listener (port 443) is configured and that the AWS ACM certificate is correctly associated. Security: Ensure that the Load Balancer's Security Group allows traffic on port 443 (HTTPS) and that the EC2 instance also has port 443 open. Instance Health: Check if your EC2 instance is healthy in the Load Balancer. If not, HTTPS traffic will not be forwarded to it. Node.js Server: Make sure your Node.js (or React) server is configured to accept HTTPS connections and is listening on port 443. Traffic Forwarding: In the Load Balancer, ensure it's forwarding traffic to the correct port of the EC2 instance (usually port 80 for HTTP).

Let us know more details, we can help you out!

profile picture
answered 12 days 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