Tuesday 7 January 2020

Apache2 SSL does not work on server or AWS

1. Check if apache2 listens 443
netstat -ntupl | grep :443
https://bobcares.com/blog/apache-not-listening-on-port-443/

2. Check if apache2 port conf
Apache2 either put listen 80 on virtual host config file /etc/apache2/sites-available/000-default.conf and listen 443 on virtual host config file /etc/apache2/sites-available/default-ssl.conf 
or at /etc/apache2/ports.conf
If not add listen 443
the listen 443 statement is usually wrapped around in <if statement
<IfModule  ssl_module>
listen 443>
</IfModule>
3. Check if ssl_module installed
dpkg -S mod_ssl.so
Should show something like :
apache2.2-common: /usr/lib/apache2/modules/mod_ssl.so
then enable the module a2enmod ssl

then restart sudo service restart apache2
if not install :
install the ssl_module by:(99% time the ssl_modl comes with apache2 server)
apt-get install mod_ssl

https://serverfault.com/questions/446328/aws-installing-mod-ssl-on-apache


Also check on AWS networksecurity group to ensure port 80 and 443 are enabled for incoming traffic:

HTTP
TCP
80
0.0.0.0/0
HTTP
TCP
80
::/0
HTTPS
TCP
443
0.0.0.0/0
HTTPS
TCP
443
::/0

No comments:

Post a Comment