Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSL installed on Apache2 but HTTPS not working

I recently installed an SSL certificate on my Amazon EC2 Ubuntu 12.04(32bit) server running Apache 2.

When I attempt to access my site via https, it does not load. When I perform an nmap scan, i see that port 443 is not open.

I tried to open port 443 in my ip tables to no avail. iptables -L yeilds

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https

Here's how I installed ssl

I modified /etc/init.d/apache2.conf to include ssl.conf and modified ssl.conf to include the requisite paths of my certificate files, ie

SSLCertificateFile /path/file SSLCertificateKeyFile /path/file SSLCertificateChainFile /path/file

I configured my security group to allow inbound requests from port 443 (TCP source:0.0.0.0/0)

When I perform the following test with php

if (!extension_loaded('openssl')) 
{
  echo "not loaded";
}
else
{
  echo "loaded"   ;
}

I get "loaded".

Any ideas?

like image 312
rocketas Avatar asked Sep 05 '25 17:09

rocketas


2 Answers

In httpd-ssl.conf, do you have Listen 443

If not, try adding that, and restarting apache.

like image 194
mti2935 Avatar answered Sep 07 '25 17:09

mti2935


First check if mod_ssl is enabled. If not, enable it by running a2enmod ssl. Then check if Apache is listening on port 443 for https. Then check if the firewall is not blocking port 443.

like image 41
David Okwii Avatar answered Sep 07 '25 16:09

David Okwii