80.md
root@localhost:~# cat 80.md

# Services and Software That Use Port 80

## Web Servers

Apache HTTP Server
The most widely used web server software, defaults to port 80 for HTTP traffic.
Nginx
High-performance web server and reverse proxy, commonly configured to listen on port 80.
Microsoft IIS
Windows-based web server that uses port 80 for HTTP communication by default.
LiteSpeed
Commercial web server known for performance, typically runs on port 80.

## Development Servers

Node.js Express
When deployed to production, Express applications typically run on port 80.
Python WSGI Servers
Gunicorn, uWSGI, and other WSGI servers often configured for port 80 in production.
Java Application Servers
Tomcat, Jetty, and other Java servers commonly use port 80 for production deployments.

## Content Management Systems

WordPress
Most WordPress installations run on port 80 through Apache or Nginx.
Drupal
PHP-based CMS that typically serves content on port 80.
Joomla
Popular CMS platform that uses port 80 for web traffic.

## Other Services

Reverse Proxies
Load balancers and reverse proxies often listen on port 80 to distribute traffic.
CDN Services
Content Delivery Networks use port 80 for HTTP content delivery.
Web APIs
REST APIs and web services commonly expose endpoints on port 80.

# Frequently Asked Questions

Q: How do I access localhost:80?

A:

Simply go to http://localhost in your browser - port 80 is the default for HTTP, so you don't need to specify it. Make sure you have a web server running first.

Q: Why is port 80 used for HTTP?

A:

Port 80 was designated as the standard HTTP port by IANA (Internet Assigned Numbers Authority) in the early days of the web. It became the universal default for web traffic.

Q: What's the difference between port 80 and 8080?

A:

Port 80 is the standard HTTP port requiring root privileges, while 8080 is a common alternative for development that doesn't require special permissions. Port 80 is for production, 8080 for development.

Q: Why does port 80 need root/admin privileges?

A:

Ports below 1024 (including 80) are 'privileged ports' reserved for system services. This security measure prevents regular users from running services that could impersonate system services.

Q: Should I use port 80 or 443?

A:

Use port 443 for HTTPS (secure) traffic and port 80 for HTTP. Modern best practice is to redirect port 80 traffic to 443 for security. Port 80 is mainly used for initial requests and redirects.

Q: How to make localhost:80 accessible externally?

A:

Configure your web server to bind to 0.0.0.0:80 instead of 127.0.0.1:80, open port 80 in your firewall, and ensure your router forwards port 80 to your machine.

Q: Can I run multiple websites on port 80?

A:

Yes, using virtual hosts (Apache) or server blocks (Nginx). The web server routes requests based on the domain name to different websites, all using port 80.

Q: How to use port 80 with Docker?

A:

Use port mapping like 'docker run -p 80:8080 myapp' to map host port 80 to container port 8080. The container can use any internal port while exposing it on port 80.

# How to Use Port 80

1.

Check Port 80 Availability

Verify that port 80 is available and not being used by other services. Note that port 80 typically requires administrator/root privileges.

bash
sudo netstat -tulpn | grep :80
2.

Start Web Server with Root Privileges

Most web servers require root/administrator privileges to bind to port 80. Start your web server with appropriate permissions.

bash
sudo nginx -t && sudo nginx
3.

Configure Firewall Rules

Ensure your firewall allows incoming connections on port 80 for web traffic.

bash
sudo ufw allow 80/tcp
4.

Test HTTP Connection

Verify that your web server is responding on port 80 by accessing http://localhost (port 80 is implied).

bash
curl http://localhost
5.

Configure Virtual Hosts/Server Blocks

Set up virtual hosts (Apache) or server blocks (Nginx) to serve multiple websites on port 80.

# Common Problems

## HIGH Severity Issues

Permission Denied on Port 80

Cannot bind to port 80 because it requires root/administrator privileges. Most systems restrict access to ports below 1024.

Port 80 Already in Use

Another web server or service is already using port 80, preventing your application from starting.

## MEDIUM Severity Issues

Firewall Blocking Port 80

Firewall rules are blocking incoming connections on port 80, making the website inaccessible from external sources.

DNS Resolution Issues

Domain names are not resolving to your server's IP address, even though the service is running on port 80.

## LOW Severity Issues

SSL/HTTPS Redirection Problems

Issues with redirecting HTTP (port 80) traffic to HTTPS (port 443), causing mixed content or redirect loops.

# Troubleshooting Solutions

## Linux Platform

Resolve Port 80 Permission Issues

For: Permission Denied on Port 80

Steps:

  1. Run your web server with root/administrator privileges
  2. Alternative: Use authbind or setcap to allow non-root access to port 80
  3. Consider using a reverse proxy setup with an unprivileged port
linux
sudo systemctl start nginx

Resolve Port 80 Permission Issues

For: Permission Denied on Port 80

Steps:

  1. Run your web server with root/administrator privileges
  2. Alternative: Use authbind or setcap to allow non-root access to port 80
  3. Consider using a reverse proxy setup with an unprivileged port
linux
sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/node

Resolve Port 80 Conflicts

For: Port 80 Already in Use

Steps:

  1. Identify which service is using port 80
  2. Stop the conflicting service if it's not needed
  3. Configure your web server to use a different port temporarily
  4. Use a reverse proxy to handle port 80 traffic
linux
sudo lsof -i :80

## Windows Platform

Resolve Port 80 Permission Issues

For: Permission Denied on Port 80

Steps:

  1. Run your web server with root/administrator privileges
  2. Alternative: Use authbind or setcap to allow non-root access to port 80
  3. Consider using a reverse proxy setup with an unprivileged port
windows
netsh http add urlacl url=http://+:80/ user=Everyone

Resolve Port 80 Conflicts

For: Port 80 Already in Use

Steps:

  1. Identify which service is using port 80
  2. Stop the conflicting service if it's not needed
  3. Configure your web server to use a different port temporarily
  4. Use a reverse proxy to handle port 80 traffic
windows
netstat -ano | findstr :80

## All Platform

Resolve Port 80 Conflicts

For: Port 80 Already in Use

Steps:

  1. Identify which service is using port 80
  2. Stop the conflicting service if it's not needed
  3. Configure your web server to use a different port temporarily
  4. Use a reverse proxy to handle port 80 traffic
all
sudo systemctl stop apache2

# Summary

root@localhost:~# echo "Port 80 Documentation Complete"

What it is: localhost:80 is Localhost:80 is the standard HTTP port used by web servers worldwide. When you visit any website without specifying a port (like http://example.com), it automatically uses port 80. This is the default port for all HTTP traffic and the foundation of web communication.

Who uses it: Apache HTTP Server, Nginx, Microsoft IIS, LiteSpeed, Node.js Express, Python WSGI Servers, Java Application Servers, WordPress, Drupal, Joomla, Reverse Proxies, CDN Services, Web APIs

Access URL: http://localhost:80