localhost:80 — HTTP Web Server

Port 80 is the default port for HTTP (Hypertext Transfer Protocol) — the foundation of web communication. When you type a URL without specifying a port, browsers automatically connect to port 80. Web servers like Apache, Nginx, and IIS listen on port 80 by default.

Access your web server: http://localhost

What is Port 80?

Port 80 is the standard port for unencrypted web traffic. When you visit http://example.com, your browser connects to that server's port 80. For secure HTTPS connections, port 443 is used instead.

URLActual Connection
http://localhostlocalhost:80
http://example.comexample.com:80
http://localhost:80localhost:80 (explicit)

What Runs on Port 80?

SoftwareTypeIncluded In
Apache HTTP ServerWeb serverXAMPP, MAMP, WAMP
NginxWeb server / reverse proxyStandalone, Docker
IISWeb serverWindows Server
CaddyWeb serverStandalone
LiteSpeedWeb serverStandalone
Python HTTPSimple serverPython built-in

Quick Web Servers (No Install)

Start a web server instantly for testing:

Python

# Python 3 (serves current directory)
python -m http.server 80

# Or on port 8000 (no admin needed)
python -m http.server 8000

PHP

php -S localhost:80
# Or without admin
php -S localhost:8000

Node.js

npx serve -l 80
# Or without admin
npx serve -l 3000

Development Stacks Using Port 80

StackWeb ServerAccess URL
XAMPPApachehttp://localhost
WAMPApachehttp://localhost
MAMPApache/Nginxhttp://localhost:8888 (default)
LaragonApache/Nginxhttp://localhost

Check if Port 80 is in Use

Windows

netstat -ano | findstr :80
# Find the process
tasklist /fi "pid eq [PID_NUMBER]"

Mac/Linux

# Find what's using port 80
sudo lsof -i :80

# Or
sudo netstat -tlnp | grep :80

Common Port 80 Conflicts

ApplicationSolution
SkypeSkype settings → Advanced → Uncheck "Use port 80"
IISStop IIS: iisreset /stop
VMwareVMware uses port 80 for web interface
SQL Server ReportingStop SSRS service
World Wide Web ServiceStop W3SVC service
Another ApacheStop the other instance

Change Apache Port

If port 80 is blocked, change Apache to use a different port:

XAMPP

  1. Open C:\xampp\apache\conf\httpd.conf
  2. Find Listen 80
  3. Change to Listen 8080
  4. Also change ServerName localhost:80 to :8080
  5. Restart Apache
  6. Access via http://localhost:8080

Port 80 vs Port 443

Port 80 (HTTP)Port 443 (HTTPS)
Unencrypted trafficSSL/TLS encrypted
http:// URLshttps:// URLs
Default for HTTPDefault for HTTPS
No certificate neededRequires SSL certificate
Development OKProduction recommended

Permission Issues

On Mac/Linux, ports below 1024 (including 80) require root/admin privileges:

# Run with sudo
sudo python -m http.server 80

# Or use a higher port (no sudo needed)
python -m http.server 8080

Troubleshooting

ProblemSolution
"Connection refused"Start your web server (Apache, Nginx)
"Port already in use"Find and stop conflicting application
"Permission denied"Run as admin or use port 8080
Apache won't startCheck error log, likely port conflict
Can't access from other devicesCheck firewall, use 0.0.0.0 instead of localhost