Question

How to open PORT : 443

I have checked that the port 443 is closed and is not listed on my droplet.

Here is the output when i run the command :

root@ubuntu-1gb-blr1-01:/# netstat -ntlp | grep LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 4749/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1626/sshd
tcp6 0 0 :::80 :::* LISTEN 17100/apache2
tcp6 0 0 :::22 :::* LISTEN 1626/sshd

Please let me know how can I open 443 port So that my website works over https.

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Let’s list the services that are running:

sudo lsof -iTCP -sTCP:LISTEN -P

Do you see Apache on port 443 on the list? If yes, then it might be a firewall issue. If no, then Apache isn’t listening on port 443, which probably is a wrongly configured VirtualHost, so let’s see the configuration for your sites.

Please let me know which Linux flavor, you are using.

In general you can use below command to open port 443 on any linux.

iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT

service iptables save

service iptables restart

Hope it will help you.

KFSys
Site Moderator
Site Moderator badge
August 8, 2023

Heya,

Just an update on an older question to clear some stuff up.

First, in order for your Droplet to listen on port 443, you need to configure something to use that port. In most cases, people configure Apache or Nginx, both are WebServices which allow your Droplet to server your website’s content.

With that said, even if you configure a WebService to listen on port 443 (which would be the secure port) you’ll need to allow it on your Firewall.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more