Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

amazon ec2 port 443 not open

I have an amazon EC2 amzn-ami-hvm-2014.09.2.x86_64-ebs instance running and port 443 does not seem to be open, even though I have added it to the instance's security group, both inbound and outbound settings:

enter image description here

I have run netstat on the EC2 instance and port 443 is not listed:

$ sudo netstat -nupt -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      2595/java           
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      2061/sshd           
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      2103/sendmail       
tcp        0      0 127.0.0.1:8005              0.0.0.0:*                   LISTEN      2595/java           
tcp        0      0 0.0.0.0:8009                0.0.0.0:*                   LISTEN      2595/java           
tcp        0      0 :::22                       :::*                        LISTEN      2061/sshd           
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               1868/dhclient       
udp        0      0 172.31.40.1:123             0.0.0.0:*                               2080/ntpd           
udp        0      0 127.0.0.1:123               0.0.0.0:*                               2080/ntpd           
udp        0      0 0.0.0.0:123                 0.0.0.0:*                               2080/ntpd

How can I open the port 443? port 80 is working fine.

EDIT: more info added

I'm running a web app on tomcat 8. When entering the ip address on the internet browser, it is successfully redirecting to https. But the page does not display.

On my apache8/conf/server.xml file I have:

<Connector port="80" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="443" />

and

 <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" redirectPort="443" />

It works fine on my development machine, successfully redirecting to port 443.

Thanks in advance, Lucas

like image 916
Lucas T Avatar asked Jan 09 '23 17:01

Lucas T


1 Answers

You need to configure apache(if you are running apache or the webserver you are using) to start using port 443. If you are using ubuntu you need to execute the following

sudo a2enmod ssl
sudo a2ensite default-ssl
sudo /etc/init.d/apache2 restart
like image 82
Dimos Karagiannis Avatar answered Jan 16 '23 20:01

Dimos Karagiannis