Title
Hi. I've been struggling to find out why my EC2 Amazon Linux (1) Instance isn't serving my site at the https://
address, even though I've confirmed that the SSL is configured, per https://www.ssllabs.com/ssltest/. I've scoured the web for answers and am still coming up short. I've gotten the following header info from two queries of the site; one with and one without https://
. www.example.net
and the non-www
work but only without the https://
. A lot of it is alien to me, though.
From http://example.net/
GET / HTTP/1.1
Host: example.net
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 5949
Content-Type: text/html; charset=utf-8
Date: Fri, 18 Oct 2019 19:18:46 GMT
Keep-Alive: timeout=5, max=99
Server: Apache/2.4.39 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
Vary: X-Requested-With,Accept-Encoding
X-Frame-Options: SAMEORIGIN
X-Powered-By: Nette Framework
From https://example.net/
GET / HTTP/1.1
Host: example.net:443
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36
HTTP/1.1 301 Moved Permanently
Content-Length: 98
Content-Type: text/html; charset=utf-8
Date: Fri, 18 Oct 2019 19:09:13 GMT
Location: http://example.net/
Server: Apache/2.4.39 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
Vary: X-Requested-With
X-Frame-Options: SAMEORIGIN
X-Powered-By: Nette Framework
Can anyone confirm from this what might be wrong? My config files all appear to be pointing to my certificate files (generated from Lets Encrypt after following this article: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html). I also don't think I saw anything messing with this in the .htaccess
, and when I set it to redirect to HTTPS
, it does, but the page it leads to is blank.
What might be wrong? Is there something else I can look at what might need to be updated? Thanks in advance.
Edit: I have also discovered that, in Nette (2.3), I need to add isSecured
to my RouterFactory.php. I've done so using this (translated): https://forum.nette.org/cs/26975-routerfactory-https-static-a-pouziti-this-fatal-error-using-this-when-not-in-object-context.
When I add the aforementioned, or if I add a rewrite rule to my .htaccess, (one or the other) I get a 500 internal error and no redirect error.