How to Open Port 80 and 443 for a Web Server

Fix HTTP and HTTPS connectivity problems for Nginx, Apache and cloud servers.

Open port 80 and 443 web server

Your website works locally.

Nginx starts correctly.

Apache reports no errors.

But users cannot access your server externally.

In most cases, ports 80 (HTTP) and 443 (HTTPS) are blocked somewhere along the network path.

🌐 Verify Ports 80 and 443

Check whether your HTTP and HTTPS ports are reachable externally.

Run Port Checker →

What Ports 80 and 443 Do

  • Port 80 → HTTP traffic
  • Port 443 → HTTPS encrypted traffic

Modern web applications almost always expose 443.

80 often redirects visitors automatically to HTTPS.

Step 1 — Verify Web Server Is Running

Nginx:

sudo systemctl status nginx
Apache:

sudo systemctl status apache2
Verify listeners:

sudo ss -tulpn
Expected:

0.0.0.0:80
0.0.0.0:443

No listener means the problem starts before networking.

Step 2 — Open Local Firewall

Ubuntu UFW:

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
Check:

sudo ufw status
RHEL / Rocky:

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https

sudo firewall-cmd --reload
Windows Server:

Verify inbound firewall rules allow:

  • TCP 80
  • TCP 443

Step 3 — Check Cloud Firewall Rules

Cloud providers frequently block traffic before it reaches your VM.

Examples:
  • AWS Security Groups
  • Azure Network Security Groups
  • Google Cloud Firewall Rules
  • Oracle Cloud Security Lists
Verify:

TCP 80 → Allow

TCP 443 → Allow

Cloud firewall problems are extremely common.

Step 4 — Verify Reverse Proxy Configuration

Nginx:

server {

listen 80;

server_name example.com;

location / {

proxy_pass http://localhost:3000;

}

}

Bad upstream configuration can appear as a networking problem.

Check configuration:

sudo nginx -t
Apache:

sudo apachectl configtest

Step 5 — External Validation

Never trust local testing.

Always validate externally.

Verify 80 / 443 →

Port Open But Site Still Fails?

Possible causes:
  • SSL configuration issue
  • Wrong reverse proxy rules
  • Certificate errors
  • Application crash
  • Cloud filtering

Read:

HTTPS Not Working?

HTTPS failures frequently come from TLS problems.

Verify certificate configuration.

Debug Checklist

  • ✅ Nginx / Apache running
  • ✅ Service listening
  • ✅ Firewall opened
  • ✅ Cloud rules validated
  • ✅ External port test completed
  • ✅ SSL configured

Final Thoughts

Port 80 and 443 problems rarely come from a single component.

Modern deployments involve:

  • Application
  • Web server
  • OS firewall
  • Cloud firewall
  • DNS
  • TLS configuration

Debug each layer independently.

🚀 Validate Your Server Now

Verify HTTP and HTTPS reachability externally.

Run Port Checker →