Troubleshooting 403 Error: Deployed Application Not Accessible via Custom Domain after Setting Up ALB and SSL with Jenkins CI/CD.

1

I've deployed an application to ECS EC2 instances using Jenkins CI/CD and can access it via private IP. I attempted to set up an ALB to route traffic, associated a custom domain via Route 53 to the ALB's DNS, and attached an SSL certificate. However, I'm encountering a 403 error when accessing it via the browser. What steps should I take to resolve this issue and ensure successful setup?

2 Answers
4
Accepted Answer

Hello, A 403 Forbidden Error occurs when you do not have permission to access a web page or something else on a web server. i will share you some of possibilities to occurs your error and how to resolve

Security Group Configuration: you must Open ports 80, 443, and any application-specific ports in the security group associated with your ECS EC2 instances. Make sure the security group allows traffic from the ALB.

ALB Target Group Port Forwarding: Verify that the ALB's target group is correctly configured to forward HTTP traffic (port 80) to HTTPS (port 443). Check the target group's health.

Domain Configuration:

  1. Confirm that your domain is hosted in Route 53 and that the DNS records are correctly configured to point to the ALB's DNS name.
  2. Verify that the domain name is spelled correctly and that there are no typos.
  3. Check if the domain name's validation is expired dates and renew it if necessary.
  4. Ensure that the domain's nameservers are correctly set to Route 53. If using a registrar like GoDaddy, update the nameservers accordingly. thes are maximum chances to resolve your 403 error, i hope this will helpful if you still facing same issue try to share detailed version of that error i will try to resolve.
profile picture
answered 22 days ago
profile picture
EXPERT
reviewed 22 days ago
profile picture
EXPERT
reviewed 22 days ago
2

Hlo Parthasaradi,

Check Security Group Settings: Ensure that the security groups associated with your ALB and ECS instances allow inbound traffic on the necessary ports (typically 80 and 443 for HTTP and HTTPS respectively). Double-check that the ALB security group allows inbound traffic from the internet.

Verify Target Group Configuration: Confirm that the target group associated with your ALB is correctly configured to route traffic to the ECS instances. Check the target group's health checks to ensure that instances are considered healthy.

SSL Certificate Configuration: Make sure that the SSL certificate is correctly configured and attached to the ALB listener. Verify that the certificate is issued for the domain you're using and hasn't expired.

Check Listener Configuration: Review the listener configuration on the ALB to ensure that it is correctly configured to forward traffic from port 443 (HTTPS) to the target group. Confirm that the HTTPS listener is associated with the correct SSL certificate.

DNS Configuration: Verify that the DNS records in Route 53 are correctly configured to point to the ALB's DNS name. Ensure that there are no typos or errors in the DNS configuration.

Check Application Configuration: Review your application's configuration to ensure that it is set up to handle HTTPS traffic correctly. Make sure that any redirects or URL configurations are updated to reflect the use of HTTPS.

Inspect ALB Access Logs: Enable access logging on your ALB and inspect the logs to see if requests are reaching the ALB and how they are being processed. This can provide valuable insight into where the issue might be occurring.

SSL/TLS Protocols and Cipher Suites: Ensure that the SSL/TLS protocols and cipher suites configured on the ALB are compatible with modern web browsers. Avoid using deprecated protocols or weak cipher suites.

Verify SSL Certificate Installation: Double-check that the SSL certificate is correctly installed on the ECS instances. If necessary, update the SSL certificate configuration on the instances to match the certificate installed on the ALB.

Check for Application-Level Security: Review your application's security settings to ensure that it is not blocking requests based on IP addresses, user agents, or other criteria.

answered 22 days ago
  • Hello Thanniru anil kumar,

    I tried to follow above steps but its getting same error 403 if you have solution in another way, please let me know. if you have tried well thank you.

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