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
Same as: localhost:80 | 127.0.0.1
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.
| URL | Actual Connection |
|---|---|
| http://localhost | localhost:80 |
| http://example.com | example.com:80 |
| http://localhost:80 | localhost:80 (explicit) |
What Runs on Port 80?
| Software | Type | Included In |
|---|---|---|
| Apache HTTP Server | Web server | XAMPP, MAMP, WAMP |
| Nginx | Web server / reverse proxy | Standalone, Docker |
| IIS | Web server | Windows Server |
| Caddy | Web server | Standalone |
| LiteSpeed | Web server | Standalone |
| Python HTTP | Simple server | Python 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
| Stack | Web Server | Access URL |
|---|---|---|
| XAMPP | Apache | http://localhost |
| WAMP | Apache | http://localhost |
| MAMP | Apache/Nginx | http://localhost:8888 (default) |
| Laragon | Apache/Nginx | http://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
| Application | Solution |
|---|---|
| Skype | Skype settings → Advanced → Uncheck "Use port 80" |
| IIS | Stop IIS: iisreset /stop |
| VMware | VMware uses port 80 for web interface |
| SQL Server Reporting | Stop SSRS service |
| World Wide Web Service | Stop W3SVC service |
| Another Apache | Stop the other instance |
Change Apache Port
If port 80 is blocked, change Apache to use a different port:
XAMPP
- Open
C:\xampp\apache\conf\httpd.conf - Find
Listen 80 - Change to
Listen 8080 - Also change
ServerName localhost:80to:8080 - Restart Apache
- Access via
http://localhost:8080
Port 80 vs Port 443
| Port 80 (HTTP) | Port 443 (HTTPS) |
|---|---|
| Unencrypted traffic | SSL/TLS encrypted |
| http:// URLs | https:// URLs |
| Default for HTTP | Default for HTTPS |
| No certificate needed | Requires SSL certificate |
| Development OK | Production 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
| Problem | Solution |
|---|---|
| "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 start | Check error log, likely port conflict |
| Can't access from other devices | Check firewall, use 0.0.0.0 instead of localhost |