0

I have my ec2 that was created with an autoscaling group and a load balancer attached to the autoscaling group. The security groups used give 0.0.0.0 to all traffic both incoming and outgoing. I have a certificate applied to the url using route 53 and have connected the load-balancer to the route. When I load everything up and type in the url, it eventually comes to a blank white page and the webpage is even showing that https is working. The load balancer shows the ec2 instance is inservice and the autoscaling group shows the instance is healthy.

The steps that I've taken are:

  • Looking through access and error logs from apache. Nothing is being shown except the health checker is gaining access.
  • Checking security groups attached inbound/outbound rules
  • I've checked the sites-enabled apache configuration and verified the DocumentRoot is correct.
  • Checked whether the load balancer and auto-scaling group sees the instance as healthy.
  • Changed out my index file for a simple html file with Hello on it in case the file was corrupt.

Does anyone have suggestions on what else I might be able to try or have had this issue before? What can I do?!

Apache Configuration:

<VirtualHost *:80>

    RewriteEngine on
    RewriteCond %{HTTP:X-Forwarded-Proto} ^http$
    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    DocumentRoot /var/www/laravel_app/public

</VirtualHost>

ELB Access Logs

Access logs are giving me a 301 for elb_status_code and backend_status_code.

HTTP Request Response

408 ~ Request Timed Out

10
  • Yeah, you should post your Apache configuration in here... This could be a misconfiguration or file permissions issue but we will never know w/o you supplying that information....
    – ryekayo
    Nov 9, 2017 at 21:08
  • Posted the apache configuration. I have a rewrite rule for any http requests to go to https Nov 9, 2017 at 21:10
  • Ok and is the apache user allowed to read the index.html?
    – ryekayo
    Nov 9, 2017 at 21:13
  • I have 644 on the file so anybody can read the file Nov 9, 2017 at 21:14
  • 1
    Test the site with curl -v or use your browser's developer tools to see the error hiding behind that white page. Enable logging in the balancer, and read the logs. Nov 9, 2017 at 23:45

1 Answer 1

0

I found out that even though I had http/https inbound and outbound rules for both my load balancer and my ec2 instance, the https instance port was set to 443 instead of 80. The working configuration is shown below:

enter image description here

This has fixed my problem, however, I'm not quite sure why if the ec2 instance and the load balancer allowed both http and https, that the instance port had to be set to 80.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .