I have a single instance EC2 LAMP server running on an elastic IP on AWS. I created a self signed certificate and enabled the mod_ssl. Currently, I am able to access my website successfully through https (after accepting an unsigned certificate), but when I actually look at the $_SERVER['SERVER_PORT'] variable in PHP, EC2 is still serving my https request over port 80. To check this, I use the following script:
<?php
echo $_SERVER['SERVER_PORT'].'<br>';
echo $_SERVER['REQUEST_SCHEME'].'<br>';
?>
Results:
80
http
However, when I look at my URL bar in all browsers, it shows a secure connection. Is my browser actually testing for a certificate and secure connection or is it just looking for a URL that begins with "https"? Is there a configuration file somewhere that is redirecting SSL traffic back to port 80?